[Python-Dev] Re: [Zope3-dev] Zip import and sys.path manipulation (was Re: directory hierarchy proposal)

Fredrik Lundh fredrik@pythonware.com
Mon, 16 Dec 2002 19:06:32 +0100


Guido van Rossum wrote:


> > Or even extendpath() <wink>>
> 
> Jim doesn't like sequences of lowercase words strung together without
> using either camelcase or underscores.

isn't Jim using Python?

>>> dir("")
['capitalize', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find',
'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper',
'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip',
'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate',
'upper']
>>> dir(os.path)
[... 'abspath', 'basename', 'commonprefix', 'dirname', 'exists', 'expanduser',
'expandvars', 'getatime ', 'getmtime', 'getsize', 'isabs', 'isdir', 'isfile', 'islink',
'ismount', 'join', 'normcase', 'normpath', 'os', 'split', 'splitdrive', 'splitext',
'splitunc', 'stat', 'walk']
>>> dir({})
[..., 'clear', 'copy', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues',
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
>>> dir(sys)
[..., '_getframe', 'api_version', 'argv', 'builtin_module_names', 'byteorder',
'copyright', 'displayhook', 'exc_info', 'exc_type', 'excepthook', 'exec_prefix',
'executable', 'exit', 'getdefaultencoding', 'getdlopenflags', 'getrecursionlimit',
'getrefcount', 'hexversion', 'last_traceback', 'last_type', 'last_value', 'maxint',
'maxunicode', 'modules', 'path', 'platform', 'prefix', 'ps1', 'ps2',
'setcheckinterval', 'setdlopenflags', 'setprofile', 'setrecursionlimit',
'settrace', 'stderr', 'stdin', 'stdout', 'version', 'version_info',
'warnoptions']

if I didn't know better, I'd surely think that sequences of lowercase words
strung together without underscores is the standard way to name functions
and methods in Python...

</F>