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/2003-July/036671.html below:

[Python-Dev] A bit faster access to module attributes

[Python-Dev] A bit faster access to module attributes [Python-Dev] A bit faster access to module attributesGuido van Rossum guido@python.org
Tue, 01 Jul 2003 07:10:28 -0400
> Python module calls PyObject_GenericGetAttr/PyObject_GenericSetAttr pair
> to do attribute lookup. (moduleobject.c,object.c)

This was introduced at the time when modules were made subclassable;
before then, it looked pretty much like what you propose.

> IMO it adds unnecessary overhead, and could be replaced with a bit
> simplified functions.

Have you found any situation where this particular operation was
time-critical?

I believe (without thinking it through in detail) that the generic
getattr/setattr routines are required in order to support subclassing
of modules, which people use.

So I think your suggestion cannot work, and I also think it is
unnecessary, so I don't believe it is worth the bother.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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