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/2001-January/011934.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,NONE,1.1

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,NONE,1.1Moshe Zadka moshez@zadka.site.co.il
Sun, 21 Jan 2001 14:37:57 +0200 (IST)
Yay! I can change to python-dev manually!
(hear sounds of the timbot's teeth grinding)

On Sat, 20 Jan 2001, Skip Montanaro <montanaro@users.sourceforge.net> wrote:
> def check_all(_modname):
>     exec "import %s" % _modname
>     verify(hasattr(sys.modules[_modname],"__all__"),
>            "%s has no __all__ attribute" % _modname)
>     exec "del %s" % _modname
>     exec "from %s import *" % _modname
>     
>     _keys = locals().keys()
....

Wouldn't it be better to use the

d = {}
exec "foo", d

And verify "d" instead?

-- 
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!
Fingerprint: 4BD1 7705 EEC0 260A 7F21  4817 C7FC A636 46D0 1BD6



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