On 1/20/2009 3:53 PM Rob Williscroft apparently wrote:
http://bugs.python.org/issue1762972 (*)
Useful. Thanks.
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Alan G Isaac wrote in news:myhdl.805$aw2@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?
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
incompatibilit
On Sun, 18 Jan 2009 11:06:10 -0600, Rob Williscroft wrote:
> You must have missed the subject line: "Re: Python 3: exec arg 1"
Doh!
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
- open(fname) -- is a file object:
>
>>>> type(open('hello.py'))
>
>
>
> BTW, exec is a statement. The brackets there are totally superfluous.
> You can, and should, write:
>
> exec open(fname)
>
You must have missed the subject line: "Re: Python
On Sun, 18 Jan 2009 14:36:15 +, Alan G Isaac wrote:
> Well, that does not really answer my question, imo. 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?
I'm not sure if this is a stupid
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.
Alan G Isaac wrote:
OK. Why?
O
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?
T
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?
Alan Isaac
--
http://ma
Alan G Isaac wrote:
In Python 3, you can no longer ``exec(open(filename))``.
I guess the reason is that in 3.0 ``open`` returns a stream,
instead of open file, and exec wants
"a string, bytes, or code object" and not a "TextIOWrapper".
So it returns an error.
Is it intentional that ``exec`` can
10 matches
Mail list logo