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/2005-October/057318.html below:

[Python-Dev] Autoloading? (Making Queue.Queue easier to use)

[Python-Dev] Autoloading? (Making Queue.Queue easier to use) [Python-Dev] Autoloading? (Making Queue.Queue easier to use)Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Fri Oct 14 19:30:05 CEST 2005
Sokolov Yura wrote:
> May be allow modules to define __getattr__ ?
> 
> def __getattr__(thing):
>      try:
>           return __some_standart_way__(thing)
>     except AttributeError:
>           if thing=="Queue":
>                import sys
>                from Queue import Queue
>                setattr(sys.modules[__name__],"Queue",Queue)
>                return Queue
>           raise

I proposed something like this in the RFE tracker a while ago, but no
one commented on it.

Reinhold

-- 
Mail address is perfectly valid!

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