Update PEP based on new wording in PEP 8 (allowing the use of underscores in
module names).
This commit is contained in:
parent
f59bb95222
commit
c3867b3154
45
pep-3108.txt
45
pep-3108.txt
|
@ -197,12 +197,12 @@ their maintenance.
|
|||
- No longer distributed with Python.
|
||||
|
||||
|
||||
Minimal usage
|
||||
-------------
|
||||
Hardly used
|
||||
------------
|
||||
|
||||
Some modules that are platform-independent have minimal usage. This
|
||||
Some modules that are platform-independent are hardly used. This
|
||||
can be from how easy it is to implement the functionality from scratch
|
||||
or because the audience for the code is small.
|
||||
or because the audience for the code is very small.
|
||||
|
||||
* audiodev
|
||||
|
||||
|
@ -351,40 +351,35 @@ required naming scheme is *not* listed below.
|
|||
PEP 8 violations
|
||||
----------------
|
||||
|
||||
PEP 8 specifies that modules "should have short, lowercase names,
|
||||
without underscores" [#pep-0008]_. There is no mention, though, if
|
||||
this rule extends to modules contained within a package. The
|
||||
assumption is that underscores are acceptable in module names when
|
||||
they are contained within a package but that any uppercase letters is
|
||||
not.
|
||||
PEP 8 specifies that modules "should have short, all-lowercase names"
|
||||
where "underscores can be used ... if it improves readability"
|
||||
[#pep-0008]_. The use of underscores is discouraged in package names.
|
||||
|
||||
================== ==================================================
|
||||
Current Name Replacement Name
|
||||
================== ==================================================
|
||||
_winreg winreg (rename also because module has a public
|
||||
interface)
|
||||
BaseHTTPServer basehttpserver
|
||||
interface and thus should not have a leading
|
||||
underscore)
|
||||
BaseHTTPServer base_http_server
|
||||
Carbon carbon
|
||||
CGIHTTPServer cgihttpserver
|
||||
CGIHTTPServer cgi_http_server
|
||||
ColorPicker colorpicker
|
||||
ConfigParser configparser
|
||||
Cookie cookie
|
||||
copy_reg copyreg
|
||||
DocXMLRPCServer docxmlrpcserver
|
||||
dummy_threading mockthreading (rename because "mock" makes more
|
||||
sense than "dummy" and rename already required)
|
||||
DocXMLRPCServer doc_xmlrpc_server
|
||||
EasyDialogs easydialogs
|
||||
HTMLParser htmlparser
|
||||
MacOS macos
|
||||
Nav nav
|
||||
PixMapWrapper pixmapwrapper
|
||||
py_compile pycompile
|
||||
PixMapWrapper pixmap_wrapper
|
||||
Queue queue
|
||||
repr reprlib (rename because module name shadows a
|
||||
built-in)
|
||||
ScrolledText scrolledtext
|
||||
SimpleHTTPServer simplehttpserver
|
||||
SimpleXMLRPCServer simplexmlrpcserver
|
||||
SimpleHTTPServer simple_http_server
|
||||
SimpleXMLRPCServer simple_xmlrpc_server
|
||||
SocketServer socketserver
|
||||
StringIO stringio
|
||||
Tix tix
|
||||
|
@ -448,8 +443,8 @@ bdb _bdb
|
|||
cl _cl
|
||||
markupbase _markupbase
|
||||
opcode _opcode
|
||||
dummythread _mockthread (assuming the
|
||||
deprecation of 'thread' occurs)
|
||||
dummy_thread _dummy_thread (assuming thread
|
||||
is deprecated)
|
||||
============ ===============================
|
||||
|
||||
|
||||
|
@ -526,10 +521,10 @@ for the suggested package (if not already existent) is being proposed.
|
|||
Have a package for Python implementations of built-in types
|
||||
instead of putting the User* modules into 'collections'?
|
||||
|
||||
* mac
|
||||
* Platform-specific
|
||||
|
||||
+ Various Mac-specific modules.
|
||||
+ Same can be done for other platform-specific code.
|
||||
+ All platform-specific modules should be placed in a package
|
||||
representing the platform.
|
||||
|
||||
* Profiling
|
||||
|
||||
|
|
Loading…
Reference in New Issue