"Don't rebind built-in names*" - it confuses readers

Grant Edwards invalid at invalid.invalid
Wed Jun 12 10:24:14 EDT 2013


On 2013-06-11, Mark Janssen <dreamingforward at gmail.com> wrote:
>>         list = []
>> Reading further, one sees that the function works with two lists, a list of
>> file names, unfortunately called 'list',
>
> That is very good advice in general:  never choose a variable name
> that is a keyword.

You can't choose a vriable name that is a keyword: the compiler won't
allow it.

"list" isn't a keyword.

-- 
Grant Edwards               grant.b.edwards        Yow! Maybe I should have
                                  at               asked for my Neutron Bomb
                              gmail.com            in PAISLEY --



More information about the Python-list mailing list