On 09/14/2012 02:07 AM, Steven D'Aprano wrote:
> On 14/09/12 18:43, Ray Jones wrote:
>
>> Between the two arrows, 'source' inexplicably switches from<type list>
>> to<type NoneType>. Why?
>
> source.remove('') does not do what you think it does. Checking the
> Fine Manual is always a good idea, or experimentation at the interactive
> interpreter:
[...]
> So source = source.remove(' ') replaces source with None instead of the
> list, which is then lost.
>
> By the way, at the interactive interpreter you can also say:
>
>
> help(list.remove)
>
> to read some documentation on the method.
>

I did use the help() on that, but I missed the 'in place' part. That
would explain things! :))

Thanks.


Ray
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to