[Tutor] (2.7.3) Inexplicable change of type
crawlzone at gmail.com
Fri Sep 14 11:13:45 CEST 2012
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
> 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:
> 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! :))
More information about the Tutor