[PATCH] A compromise on case

Huaiyu Zhu hzhu at rocket.knowledgetrack.com
Wed May 24 21:49:24 CEST 2000


On 23 May 2000 14:11:46 -0400, Jeff Senn <senn at maya.com> wrote:
>
>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"...

Three ways to fix this without case insensitivity:

(1) Introduce += etc so we can write CountOfLumberJacksAvailable += 1
(2) Use a friendlier name, esp if it is meant to be typed in by newbies.
(3) Design a tool that highlights all the first appearance of a name.

These fixes would be useful for everyone _including programmers_.
BTW, the patch for error message was really great!

Huaiyu



More information about the Python-list mailing list