Library Naming Conventions.

C

chris.lyon

Is there any specific naming convention as to capitalisation?

Cookies versus cgi for example.
 
C

chris.lyon

quoting:

Modules should have short, lowercase names, without underscores.

this still doesn't explain Cookie.
 
P

Peter Hansen

quoting:

Modules should have short, lowercase names, without underscores.

this still doesn't explain Cookie.

Sure it does. The subject line says "conventions", and a convention
isn't a firm rule, just something many people agree on. Obviously the
author of Cookie has different preferences. Nobody is bound by a
convention.

The PEP describes what is widespread but not universal preference,
that's all.

-Peter
 
F

Fredrik Lundh

quoting:

Modules should have short, lowercase names, without underscores.

this still doesn't explain Cookie.

the document you're quoting also says:

This document was adapted from Guido's original Python Style
Guide essay[2]

where [2] points to a document that says:

Module names can be either MixedCase or lowercase.
There is no unambiguous convention to decide which
to use. Modules that export a single class (or a number
of closely related classes, plus some additional support)
are often named in MixedCase, with the module name
being the same as the class name (e.g. the standard
StringIO module). Modules that export a bunch of
functions are usually named in all lowercase.

</F>
 
R

Robert Kern

quoting:

Modules should have short, lowercase names, without underscores.

this still doesn't explain Cookie.

PEP-008 didn't exist since the beginning of Python's development. Cookie
(I believe) predates PEP-008.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top