[Quotations deleted since I'm not replying to anything directly]

When I need an identifier unique to a class I just use a reference to
the class itself.  As such I'd like to suggest that
obj.__private
be converted to
obj.__dict__[(type(obj), '__private')]

Note that I'm accessing __dict__ directly so as to avoid getattr's
requirement for attribute names to be strings.

Obviously it doesn't handle backwards compatibility, so it's more of a
"if I could do it again.." suggestion.

--
Adam Olsen, aka Rhamphoryncus
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to