PEP263 and execfile()
Martin v. Löwis
martin at v.loewis.de
Wed Nov 19 13:55:14 EST 2003
"Denis S. Otkidach" <ods at strana.ru> writes:
> 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.
By the time the warning will be turned into an error, nearly all files
will have an encoding declaration, or only contain ASCII. Then, it
won't be a problem that there is an exception if there is an error in
a file executed with execfile.
Regards,
Martin
More information about the Python-list
mailing list