A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071052.html below:

[Python-Dev] Summary of "dynamic attribute access" discussion

[Python-Dev] Summary of "dynamic attribute access" discussion [Python-Dev] Summary of "dynamic attribute access" discussionJosiah Carlson jcarlson at uci.edu
Tue Feb 13 19:47:05 CET 2007
Ron Adam <rrr at ronadam.com> 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

More information about the Python-Dev mailing list

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