Samuele Pedroni <pedronis <at> bluewin.ch> writes: > At 11:25 27.02.2004 +0000, Alan Green wrote: > >It would be really spiffy if the decorator were able to run the decorated > >function and then have access to the function's locals dictionary. It would > >then be possible to define a property like so: > > > >class Foo(object): > > def bar(self) [property]: > > """ bar property docstring """ > > def get(self): > > return self.__bar > > def set(self, bar): > > self.__bar = bar > please, leave the can of worms of "blocks" etc closed, I see you your point. > btw > > class bar(self) [property]: > > can achieve this, but it's really a sucky syntax for that. Agreed. Can already something like that in Python 2.3 with: class Foo: class bar(propertydef): def get(self): ... etc ... And it's ugly too. > It's really an > orthogonal issue wrt PEP318. If someone want to open it, it should really > write a separate PEP aftering re-reading the old threads. OK. Would you be able give me some pointers to the old threads or some clues about what to search on? I've obviously been looking in the wrong places. -- Alan --
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