Names for modules and functions
Robert Brewer
fumanchu at amor.org
Tue Dec 2 00:44:15 EST 2003
More information about the Python-list mailing list
Tue Dec 2 00:44:15 EST 2003
- Previous message (by thread): newbie - integer variable with leading zero for os.makedirs
- Next message (by thread): Names for modules and functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jeff Wagner wrote: > This just might be the weirdest question you have heard yet > but what is a good way to come up with > names for modules, function, etc.? > > So, are there any guidelines? Some of the answers are in PEP 8: http://www.python.org/peps/pep-0008.html > Also, is it ok to name a module and function the same? > > --- EnterName.py --- > def EnterName(): > ... > --- End --- Also in PEP 8: "Modules that export a single class (or a number of closely related classes, plus some additional support) are often named in CapWords, with the module name being the same as the class name (e.g. the standard StringIO module)." Now, if that applies to classes, you might guess it applies to functions, as well. The BEST advice I can give you is, when you have questions like this one, TRY IT! :) Robert Brewer MIS Amor Ministries fumanchu at amor.org
- Previous message (by thread): newbie - integer variable with leading zero for os.makedirs
- Next message (by thread): Names for modules and functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list