> > Except that sometimes you really do want x.__class__.__classdict__ to > > have priority (e.g. for "guarded" attributes). > > What's a "guarded" attribute? I meant an attribute that's implemented by a pair of get and set functions. This is very useful; my proposed design lets you define this more directly rather than requiring you to override __getattr__ and __setattr__. > > But the issue of backwards compatibility is a big one here > > I was thinking that, while this is still in the __future__, > the __dict__ attribute would be a pseudo-dict that, by > default, behaves like the union of the old __dict__ and > the __classdict__. Actually, I think that what's in the __dict__ is just perfect; it's the definition of getattr(classobject, name) where name is both an instance and a class method that causes trouble. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4