PEP263 and execfile()

Denis S. Otkidach ods at strana.ru
Wed Nov 19 04:50:57 EST 2003


On 18 Nov 2003, Martin v. [iso-8859-15] LЖwis wrote:

MvL> > But is there solution possible without modification of
MvL> > all those files I do execfile() on?
MvL>
MvL> Yes, call warnings.filterwarnings() before calling
MvL> execfile().

What about warnings.filtererrors() in future versions of Python
when this warning will be turned into error?  I guess it's OK as
temporal hack but it's not a solution of the problem.
May be execfile and compile functions should have optional
encoding parameter?  I'm not sure about execfile, but compile
must have it.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]






More information about the Python-list mailing list