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

[Python-Dev] Advice in stat.py

[Python-Dev] Advice in stat.py [Python-Dev] Advice in stat.pyGuido van Rossum guido@zope.com
Sun, 29 Jul 2001 18:40:22 -0400
> > > >>> def spam(x,y):
> > > ...      exec y
> > > ...      def eggs():
> > > ...          print x
> 
> > That one is just fine I think.
> 
> Why is 'import *' inside a function fine, but a bare exec isn't ? Weren't
> you going to deprecate bare exec's altogether ?

You mean the other way around don't you?  I proposed a warning for
import * but not for bare exec.  I guess for me the difference is that
import * is just stupid (potentially lots of work going on every time
you call the function) while the main problem with bare exec is that
it gets in the way of optimizers and the like.  Since we don't have an
optimizer (yet) I don't care so much (yet).

--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