[Tutor] KeyError: 'DEFAULT'

Marc Tompkins marc.tompkins at gmail.com
Fri Feb 20 06:05:41 CET 2009


On Thu, Feb 19, 2009 at 8:39 PM, Lie Ryan <lie.1296 at gmail.com> wrote:

> On Thu, 19 Feb 2009 11:45:52 -0800, Marc Tompkins wrote:
> > Don't use reserved words as variable names!
>
> <nitpick>
> str, set is built-in function not reserved words. Reserved words are like
> if, for, from, as (see the whole list type keywords in help() )
>
> Nevertheless, it is a bad idea to use built-in function names.
> </nitpick>
>

Fair 'nuff.

Furthermore, there _are_ cases when you want to use built-in type or
function names: when you're overloading them with your own versions.  That's
why Python lets you use them in the first place... but if that wasn't what
you wanted to do, then avoid them like the plaque.  (A little dental humor
there.)
-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090219/9a7c971d/attachment.htm>


More information about the Tutor mailing list