[PATCH] A compromise on case
nickm at mit.edu
Tue May 23 21:34:16 CEST 2000
On 23 May 2000 14:11:46 -0400, Jeff Senn <senn at maya.com> wrote:
>Merits of the patch aside (I like the idea!), it still doesn't get to
>the core of *why* Guido suspects there are benefits to making the
>Just consider how to handle the more complex case of code like:
> CountOfLumberJacksAvailable = 12
> if something.or.other():
> CountOfLumberjacksAvailable = CountOfLumberJacksAvailable + 1
> print CountOfLumberJacksAvailable
>Code, which you will notice, generates no "errors"...
Hm. This would call for a 'identifier-only-used-once' kind of an
error. Within a function, this is fairly reasonable. The problem is
what to do when you see things like the code above at the module level.
Personally, I think that case-insensitivity is not really the right
way to solve the issue you address. Even if you solve the error in
the code above, I know from experience that I will sometimes mistype
not only as 'CountOfLumberjacksAvailable'
but also as 'NumberOfLumbarJacksAvailable'
and as 'NumberOfLumberJacksAvailable'.
Having a good, built-in PyLint-ish tool could help for all of these
Nick Mathewson <nickm at mit.edu> http://www.mit.edu/~nickm/
More information about the Python-list