Case insensitivity

Bengt Richter bokr at accessone.com
Sat Jul 21 17:51:13 EDT 2001


On Thu, 19 Jul 2001 20:30:15 GMT, Guido van Rossum <guido at python.org> wrote:

>Fair enough.  So let's begin the real discussion.
>
Perhaps some actual data will help. See below.

[...]
>To me, the only real important question is, how can we introduce
>case-sensitivity for novices without breaking the millions of lines of
      ^^^^^^^^^^^ -- easy, make no change ;-)
>existing Python code.  One option could be: forget it, it's too late.
>Another: put the case-insensitivity in the tools.
>
An option to have IDE's or editors make case-sensitivity easy for newbies
would have my vote, but not changing the base language case sensitivity.
BTW, thanks for a great language! :) Wish I'd decided to look into it sooner.

Here is the way symbols have been used with case sensitivity in
(windows distribution) Python-2.1\Lib\*.py:

[Files with no multi-case symbols omitted, numbers are instances of the symbol.
BTW, other than a change not to print headers for no-instance files, the code
that made this listing is in another post (Re: Language change and code breaks).
Should one include a copy in a case like this, or just refer?]

---- D:\Python-2.1\Lib\aifc.py ----
{'Chunk': 3, 'chunk': 28}
{'Error': 40, 'error': 3}
{'SetParams': 2, 'setparams': 2}
---- D:\Python-2.1\Lib\asyncore.py ----
{'FCNTL': 4, 'fcntl': 5}
{'debug': 2, 'DEBUG': 3}
---- D:\Python-2.1\Lib\audiodev.py ----
{'al': 11, 'AL': 25}
{'sunaudiodev': 3, 'SUNAUDIODEV': 3}
---- D:\Python-2.1\Lib\BaseHTTPServer.py ----
{'message': 11, 'Message': 1}
---- D:\Python-2.1\Lib\Bastion.py ----
{'RExec': 1, 'rexec': 2}
{'bastionclass': 2, 'BastionClass': 2}
---- D:\Python-2.1\Lib\binhex.py ----
{'hexbin': 2, 'HexBin': 2}
{'FInfo': 11, 'finfo': 19}
{'type': 6, 'Type': 6}
{'linelen': 4, 'LINELEN': 3}
{'binhex': 2, 'BinHex': 2}
{'FName': 2, 'fname': 8}
{'flags': 2, 'Flags': 5}
{'Creator': 5, 'creator': 2}
---- D:\Python-2.1\Lib\cmd.py ----
{'Cmd': 1, 'cmd': 11}
{'prompt': 3, 'PROMPT': 2}
{'IDENTCHARS': 2, 'identchars': 2}
---- D:\Python-2.1\Lib\codecs.py ----
{'Writer': 6, 'writer': 8}
{'Reader': 6, 'reader': 12}
---- D:\Python-2.1\Lib\Cookie.py ----
{'K': 30, 'k': 6}
---- D:\Python-2.1\Lib\copy.py ----
{'Error': 2, 'error': 3}
{'C': 2, 'c': 2}
---- D:\Python-2.1\Lib\dis.py ----
{'extended_arg': 4, 'EXTENDED_ARG': 2}
---- D:\Python-2.1\Lib\doctest.py ----
{'Tester': 2, 'tester': 7}
---- D:\Python-2.1\Lib\filecmp.py ----
{'BUFSIZE': 2, 'bufsize': 3}
---- D:\Python-2.1\Lib\ftplib.py ----
{'netrc': 2, 'Netrc': 2}
{'Error': 6, 'error': 1}
{'FTP': 2, 'ftp': 9}
---- D:\Python-2.1\Lib\gettext.py ----
{'Catalog': 1, 'catalog': 2}
{'MASK': 9, 'mask': 6}
---- D:\Python-2.1\Lib\gzip.py ----
{'fname': 4, 'FNAME': 3}
{'write': 14, 'WRITE': 4}
{'read': 15, 'READ': 3}
---- D:\Python-2.1\Lib\ihooks.py ----
{'hooks': 27, 'Hooks': 2}
{'VERBOSE': 4, 'verbose': 14}
---- D:\Python-2.1\Lib\imaplib.py ----
{'debug': 14, 'Debug': 4}
{'literal': 15, 'Literal': 2}
{'USER': 4, 'user': 2}
{'flags': 14, 'Flags': 2}
---- D:\Python-2.1\Lib\imputil.py ----
{'Importer': 3, 'importer': 5}
---- D:\Python-2.1\Lib\inspect.py ----
{'name': 13, 'NAME': 1}
{'INDENT': 1, 'indent': 12}
---- D:\Python-2.1\Lib\mhlib.py ----
{'path': 67, 'PATH': 2}
{'Folder': 2, 'folder': 4}
{'mh': 13, 'MH': 2}
{'Error': 21, 'error': 23}
{'MultiFile': 1, 'multifile': 2}
---- D:\Python-2.1\Lib\mimify.py ----
{'i': 9, 'I': 9}
{'file': 9, 'File': 5}
---- D:\Python-2.1\Lib\os.py ----
{'PATH': 2, 'path': 19}
---- D:\Python-2.1\Lib\pdb.py ----
{'bdb': 9, 'Bdb': 3}
{'cmd': 4, 'Cmd': 3}
---- D:\Python-2.1\Lib\pickle.py ----
{'dict': 4, 'DICT': 3}
{'FLOAT': 3, 'float': 1}
{'long': 1, 'LONG': 3}
{'inst': 4, 'INST': 3}
{'put': 11, 'PUT': 3}
{'MARK': 8, 'mark': 13}
{'list': 4, 'LIST': 3}
{'TUPLE': 3, 'tuple': 3}
{'f': 7, 'F': 3}
{'APPEND': 3, 'append': 35}
{'int': 1, 'INT': 3}
{'c': 7, 'C': 2}
{'unicode': 7, 'UNICODE': 4}
{'GET': 3, 'get': 4}
{'None': 16, 'NONE': 3}
{'reduce': 7, 'REDUCE': 3}
---- D:\Python-2.1\Lib\pipes.py ----
{'FILE': 2, 'file': 17}
---- D:\Python-2.1\Lib\popen2.py ----
{'popen3': 5, 'Popen3': 5}
{'popen4': 3, 'Popen4': 3}
---- D:\Python-2.1\Lib\posixfile.py ----
{'FCNTL': 21, 'fcntl': 14}
---- D:\Python-2.1\Lib\pre.py ----
{'m': 9, 'M': 1}
{'i': 14, 'I': 1}
---- D:\Python-2.1\Lib\profile.py ----
{'stats': 7, 'Stats': 2}
---- D:\Python-2.1\Lib\pstats.py ----
{'cmd': 2, 'Cmd': 1}
{'stats': 34, 'Stats': 4}
---- D:\Python-2.1\Lib\pyclbr.py ----
{'Class': 4, 'class': 2}
---- D:\Python-2.1\Lib\pydoc.py ----
{'Repr': 6, 'repr': 28}
{'message': 2, 'Message': 5}
{'Scanner': 3, 'scanner': 9}
{'I': 2, 'i': 10}
{'Doc': 3, 'doc': 27}
{'S': 2, 's': 2}
{'GUI': 2, 'gui': 3}
{'Entry': 1, 'entry': 10}
---- D:\Python-2.1\Lib\Queue.py ----
{'Empty': 2, 'empty': 1}
{'Full': 2, 'full': 1}
{'queue': 7, 'Queue': 1}
---- D:\Python-2.1\Lib\random.py ----
{'VERSION': 3, 'version': 4}
{'n': 14, 'N': 20}
{'Random': 2, 'random': 45}
---- D:\Python-2.1\Lib\repr.py ----
{'repr': 3, 'Repr': 2}
---- D:\Python-2.1\Lib\rexec.py ----
{'hooks': 6, 'Hooks': 2}
{'RExec': 2, 'rexec': 13}
---- D:\Python-2.1\Lib\rfc822.py ----
{'AddressList': 3, 'addresslist': 19}
---- D:\Python-2.1\Lib\robotparser.py ----
{'Entry': 5, 'entry': 15}
---- D:\Python-2.1\Lib\smtpd.py ----
{'options': 15, 'Options': 2}
{'data': 18, 'DATA': 3}
{'command': 16, 'COMMAND': 5}
---- D:\Python-2.1\Lib\sre.py ----
{'s': 15, 'S': 1}
{'m': 14, 'M': 1}
{'template': 15, 'TEMPLATE': 1}
{'i': 19, 'I': 1}
{'Pattern': 1, 'pattern': 38}
{'SubPattern': 2, 'SUBPATTERN': 2}
{'scanner': 4, 'Scanner': 1}
---- D:\Python-2.1\Lib\sre_compile.py ----
{'in': 19, 'IN': 2}
{'literal': 2, 'LITERAL': 9}
{'ASSERT': 1, 'assert': 2}
{'charset': 16, 'CHARSET': 2}
{'range': 2, 'RANGE': 3}
---- D:\Python-2.1\Lib\sre_constants.py ----
{'IN': 3, 'in': 2}
---- D:\Python-2.1\Lib\sre_parse.py ----
{'pattern': 16, 'Pattern': 2}
{'subpattern': 25, 'SubPattern': 5, 'SUBPATTERN': 2}
{'IN': 11, 'in': 40}
{'literal': 7, 'LITERAL': 31}
{'flags': 11, 'FLAGS': 4}
---- D:\Python-2.1\Lib\symtable.py ----
{'Class': 2, 'class': 5}
---- D:\Python-2.1\Lib\telnetlib.py ----
{'DEBUGLEVEL': 2, 'debuglevel': 9}
---- D:\Python-2.1\Lib\tempfile.py ----
{'MACFS': 3, 'macfs': 4}
---- D:\Python-2.1\Lib\threading.py ----
{'thread': 6, 'Thread': 9}
{'lock': 9, 'Lock': 4}
{'_VERBOSE': 2, '_Verbose': 14}
---- D:\Python-2.1\Lib\token.py ----
{'STRING': 1, 'string': 1}
{'NAME': 1, 'name': 2}
---- D:\Python-2.1\Lib\tokenize.py ----
{'contstr': 10, 'ContStr': 2}
{'STRING': 3, 'String': 2, 'string': 3}
{'indent': 1, 'INDENT': 1}
{'NUMBER': 1, 'Number': 3}
{'Name': 3, 'NAME': 1}
{'Token': 2, 'token': 23}
{'Comment': 3, 'COMMENT': 4}
---- D:\Python-2.1\Lib\unittest.py ----
{'TestLoader': 3, 'testLoader': 5}
---- D:\Python-2.1\Lib\urllib.py ----
{'Close': 1, 'close': 14}
{'ic': 4, 'IC': 1}
{'ftp': 13, 'FTP': 1}
---- D:\Python-2.1\Lib\urllib2.py ----
{'H': 10, 'h': 20}
---- D:\Python-2.1\Lib\uu.py ----
{'Error': 4, 'error': 1}
---- D:\Python-2.1\Lib\warnings.py ----
{'i': 4, 'I': 1}
---- D:\Python-2.1\Lib\wave.py ----
{'Chunk': 3, 'chunk': 22}
---- D:\Python-2.1\Lib\webbrowser.py ----
{'Error': 2, 'error': 1}
---- D:\Python-2.1\Lib\xdrlib.py ----
{'Error': 3, 'error': 2}
---- D:\Python-2.1\Lib\zipfile.py ----
{'crc': 2, 'CRC': 15}




More information about the Python-list mailing list