Ron Adam <[EMAIL PROTECTED]> wrote:
> Georg Brandl wrote:
> Would it be possible for attrview to be a property?

Yes, but getting the right spelling will be hard.

> Something like...  (Probably needs more than this to handle all cases.)
> 
>      class obj(object):
>          def _attrview(self):
>              return self.__dict__
>          attr = property(_attrview)

This doesn't handle descriptors, slots, non-dynamic instance methods, or
even objects without a __dict__ .  Generally speaking, you need a
wrapper object.


 - Josiah

_______________________________________________
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