Alan G Isaac wrote:
Alan G Isaac wrote:
Is it intentional that ``exec`` cannot handle a TextIOWrapper?
Bottom line: has ``execfile(filename)`` really become
``exec(open(filename).read())``? Is this a good thing?
On 1/17/2009 4:20 PM Terry Reedy apparently wrote:
Yes. Yes.
OK. Why?
This: execfile(filename)
is a trivial (9 keystroke) abbreviation of
this: exec(open(filename).read())
which is similar in effect to
this: from filename import *
so it is really not needed.
--
http://mail.python.org/mailman/listinfo/python-list