There must be a better way

Colin J. Williams cjw at ncf.ca
Sun Apr 21 11:17:04 EDT 2013


On 21/04/2013 9:39 AM, Jussi Piitulainen wrote:
> Colin J. Williams writes:
> ...
>> It is not usual to have a name with preceding and following
>> udserscores,imn user code.
>>
>> Presumably, there is a rationale for the change from csv.reader.next
>> to csv.reader.__next__.
> ...
>
> I think the user code is supposed to be next(csv.reader). For example,
> current documentation contains the following.
>
> # csvreader.__next__()
> # Return the next row of the reader’s iterable object as a list,
> # parsed according to the current dialect. Usually you should call
> # this as next(reader).
>
Thanks,

This works with both 2.7 and 3.3

Colin W.



More information about the Python-list mailing list