|
|
|
You should look at the enthought.traits module. It does this and much more (and this is coded in C, so it is fast !)
Gael Varoquaux |
Homepage |
07/02/11 - 9:31 pm | #
|
|
take a look at this recipe (and especially Ian Bicking comment):
http://aspn.activestate.com/ASPN...n/Recipe/
410698
Ido |
07/02/11 - 11:43 pm | #
|
|
Hmmm... I think I prefer the approach of inheriting from 'WithProperties' (a class that uses the '__properties__' metaclass) and then having proeprties created automatically from getter / setter methods.
I think this is much more readable than inline classes and avoids the settrace hacks.
Fuzzyman |
Homepage |
07/02/12 - 10:08 pm | #
|
|
|
Commenting by HaloScan
|