[EMAIL PROTECTED] writes: > I am puzzled, and could have read what you want wrong. Are you saying > you want something like this : > > a={} > a.something = "I want to hang my stuff here, outside the intended use > of dict"
Exactly. For a use case, consider calling select.select on lists of file objects. If the processing is simple enough, the clearest way to associate a handler with each socket is just to add it as an attribute. But that doesn't work - sockets are bulitin types. So you consider less light-weight solutions, like subclassing socket (now that that's possible), or a dictionary of handlers keyed by socket. This works by default with classes written in Python. That it doesn't work for builtins is inconsistent, non-orthogonal, and incomplete. However, it's easy to work around, and the obvious fix - adding a dictionary to every builtin - is rather costly. So we'll live with it since practicality beats purity. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list