[Python-ideas] wild idea : target decorators

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 25 02:38:23 CEST 2009

Boris Borcic wrote:

> @f
> x

I was thinking about something like this myself recently.
I have some custom property classes that I use extensively
in a couple of projects, declared like this:

   foo = fancy_property('foo', 'The fancy foo property')

It would be nice to be able to write this as something

   foo = 'The fancy foo property'

or perhaps

   @fancy_property('The fancy foo property')
   foo = default_foo_value

> x @= f

I think that would be going a bit too far.


More information about the Python-ideas mailing list