[Python-Dev] Property syntax (Re: [Python-Dev] Extended Function syntax)

Aahz aahz@pythoncraft.com
Fri, 31 Jan 2003 10:56:37 -0500


On Fri, Jan 31, 2003, Greg Ewing wrote:
>
> But anyway, here's another idea:
> 
>   def foo as property:
>     def __get__(self):
>       ...
>     def __set__(self, x):
>       ...

+1

I know Guido has already said he doesn't like this, but it reads very
Pythonically to me, and IMO there's already precedent for abusing "def"
because of generators.  It's too bad this idea didn't show up before
generators existed.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach