Guido: > But the problem is that it makes proprty a keyword, which is a Big > Change. The more kludgy workarounds I see proposed here for *not* having a new keyword, the more I feel that it would be worth whatever pain it takes to add one, to get a decent, clean, magic-free syntax for properties. It's a bit unfortunate that you've already decided to use "property" as a type name. Is that meant to be official, or is it still considered an experimental detail? If you don't want to change it, maybe the keyword could be something else, like defproperty or __property__. Hmmm, lets try that: class Foo(object): __property__ myprop: def __get__(self): ... def __set__(self, x): ... Doesn't look too bad, once you get used to the idea that an __xxx___ name can be a keyword... Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4