Terry Reedy writes:
> ...
>> The problem seems to come from my expectation that a file
>> is its own iterator and in python3 that is no longer true
>> for a NamedTemporaryFile.
> ...
>> Should this be considered a bug?
>
> No. The doc for NamedTemporaryFile does not even claim
On Fri, Jul 29, 2016 at 7:34 PM, Terry Reedy wrote:
> On 7/29/2016 7:59 AM, eryk sun wrote:
>>
>> On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon
>> wrote:
>>>
>>> The problem seems to come from my expectation that a file
>>> is its own iterator and
On 7/29/2016 7:59 AM, eryk sun wrote:
On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon
wrote:
The problem seems to come from my expectation that a file
is its own iterator and in python3 that is no longer true
for a NamedTemporaryFile.
For some reason it uses a
On 7/29/2016 4:43 AM, Antoon Pardon wrote:
Below is a short program that illustrate the problem
It works with python2, whether you use the -c option or not.
It only works with python3 if you use the -c option.
The problem seems to come from my expectation that a file
is its own iterator and in
On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon
wrote:
>
> The problem seems to come from my expectation that a file
> is its own iterator and in python3 that is no longer true
> for a NamedTemporaryFile.
For some reason it uses a generator function for __iter__
Below is a short program that illustrate the problem
It works with python2, whether you use the -c option or not.
It only works with python3 if you use the -c option.
The problem seems to come from my expectation that a file
is its own iterator and in python3 that is no longer true
for a
rt.py", line 35, in loading
ln = load(fl)
File "/local/home/apardon/src/fietsroutes/route.py", line 366, in load
return greep(next(fl))
TypeError: '_TemporaryFileWrapper' object is not an iterator
Locals by frame, innermost last
Frame main in /local/home/apardon/src/fiets