My stupid newbie mistake
Fredrik Lundh
fredrik at pythonware.com
Mon Apr 11 11:42:18 EDT 2005
Larry Bates wrote:
> Because Python allows you to replace built-in methods with
> your own. Later you will find that this can be extremely
> powerful. You will stumble on this if you name a list 'list'
> a string 'str', integer 'int', float 'float', dictionary
> 'dict', ... (at least I did <grin>).
try is a reserved word.
list, str, int, float, dict are not reserved words. you can accidentally
shadow built-in objects by using one of them for your own purposes
(this may or may not matter), but it's not a syntax error.
</F>
More information about the Python-list
mailing list