Puzzled by list-appending behavior

John Ladasky ladasky at my-deja.com
Thu May 26 14:27:35 EDT 2011


On May 25, 9:46 pm, Uncle Ben <bgr... at nycap.rr.com> wrote:

> list = [1,2,3]

Somewhat unrelated, but... is it a good idea to name your list
"list"?  Isn't that the name of Python's built-in list constructor
method?

Shadowing a built-in has contributed to more than one subtle bug in my
code, and I've learned to avoid it.



More information about the Python-list mailing list