My stupid newbie mistake

Peter Hansen peter at engcorp.com
Mon Apr 11 11:15:26 EDT 2005


Larry Bates wrote:
> Matt Feinstein wrote:
>>>>>import try
>>
>>gave a syntax error... So, how about a
>>'YouAreUsingAReservedWordStupid' exception ?
>
> Because Python allows you to replace built-in methods with
> your own.  Later you will find that this can be extremely
> powerful.  

Powerful, but not involved in this case, since you
can't redefine *keywords* such as 'try'.

-Peter



More information about the Python-list mailing list