A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-December/010891.html below:

[Python-Dev] PEP 231, __findattr__()

[Python-Dev] PEP 231, __findattr__()Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 5 Dec 2000 00:19:37 +0100
> I'm not sure I understand what Moshe was proposing.  Moshe: are you
> saying that we should change the way the compiler works, so that it
> somehow recognizes this special case?  I'm not sure I like that
> approach.  I think I want something more runtime-y, but I'm not sure
> why (maybe just because I'm more comfortable mucking about in the
> run-time than in the compiler).

I guess you are also uncomfortable with the problem that the
compile-time analysis cannot "see" through levels of indirection.
E.g. if findattr as

   return self.compute_attribute(real_attribute)

then compile-time analysis could figure out to call compute_attribute
directly. However, that method may be implemented as 

  def compute_attribute(self,name):
    return self.mapping[name]

where the access to mapping could not be detected statically.

Regards,
Martin




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