Immutability

Georg Brandl g.brandl-nospam at gmx.net
Wed Jun 28 15:29:31 EDT 2006


Duncan Booth wrote:
> Georg Brandl wrote:
> 
>> In my opinion property isn't really meant to be used as a decorator since
>> it's impossible to create a read-write property. The decorator pattern
>> doesn't really fit here.
>> 
> I agree that property isn't currently intended to be used as a decorator, 
> but it isn't actually *impossible* to create a read-write property using 
> decorators. Here is one way:

Yes, I only wanted to say that it isn't possible by just using the builtin
property function as a decorator.

Georg



More information about the Python-list mailing list