Module names beginning w/ a digit

John E. Barham jbarham at jbarham.com
Thu Nov 7 18:02:05 EST 2002


Why can't Python module names start a digit?

e.g.:

> touch 9P.py
> python
Python 2.2.1 (#1, Aug 10 2002, 15:08:14)
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> import 9P
  File "<stdin>", line 1
    import 9P
           ^
SyntaxError: invalid syntax





More information about the Python-list mailing list