PEP: Adding decorators for everything

2005-10-17 Thread tharaka
Hi Guys, This is an idea for a PEP. How would you guys feel about adding decorator support for "everything"? Currently, only functions and method are supported. For example: @GuardedClass class Foo: @Transient a = 'a transient field, ignored when serializing' @Const PI = 22.0 /

Re: Fire event when variable is Set/Get

2005-07-24 Thread tharaka
You are in luck because Python has "Properties" just like .NET. For details lookup the documentation of the built-in function property(). I'll just paste it here: property( [fget[, fset[, fdel[, doc) Return a property attribute for new-style classes (classes that derive from object). fget i