Python 3: exec arg 1

Rob Williscroft rtw at freenet.co.uk
Tue Jan 20 21:53:16 CET 2009


Alan G Isaac wrote in news:myhdl.805$Aw2.484 at nwrddc02.gnilink.net in 
comp.lang.python:

> On 1/18/2009 9:36 AM Alan G Isaac apparently wrote:
>> I do not much care about the disappearance of ``execfile``.
>> I was asking, why is it a **good thing** that
>> ``exec`` does not accept a TextIOWrapper?
>> Or is it just not implemented yet?
>> What is the gain from this particular backwards
>> incompatibility (in the sense that ``exec(open(fname))``
>> no longer works)?
> 
> Still interested in an answer...
> Alan Isaac

http://bugs.python.org/issue1762972 (*)

IIRC, exec(open(fname).read()) is the Py 3.0 replacement.

*) For reference, 2 clicks away from <url:http://www.google.co.uk/search?
hl=en&q=TextIOWrapper+exec+site%3Abugs.python.org&meta=>

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/



More information about the Python-list mailing list