On 2008-02-04 16:38, Antoine wrote:
It's actually more about convention than actual use :-)
If we name the module http.cookies, we'd also have to name the server module http.servers, since there are multiple server implementations included.
http.cookies is about managing cookies, i.e. you often manage several cookies at a time. On the other hand you seldom launch several HTTP servers in the same program. The difference looks natural to me.
Like I said: it's a matter of convention.
There are other instances in the stdlib where one or the other style is used, e.g. codecs, types, pipes, collestions vs. re, decimal, datetime, Queue.
While we're at it, we could cleanup those as well and stick with one naming scheme.
I don't have a clear favorite, except that other language libraries use the singular form throughout.
Perhaps all that's needed is a spelled-out more complex convention which makes it clear why http.server uses the singular form, while http.cookies is plural.
Another nit: some modules are named ...lib, while others do not include this suffix. It's not quite clear why a modules that's already part of the standard lib needs to have the "...lib" suffix. This is also not handled in a consistent manner, e.g. hashlib, ftplib, htmllib vs. xml, subprocess, shelve.
I'd be in favor of dropping the "lib" suffixes.