Commits

smontanaro committed 79d5339

removed __all__ from several modules

Comments (0)

Files changed (16)

 """A multi-producer, multi-consumer queue."""
 
-__all__ = ["Queue","Empty","Full"]
-
 class Empty(Exception):
     "Exception raised by Queue.get(block=0)/get_nowait()."
     pass
 """A more or less complete user-defined wrapper around dictionary objects."""
 
-__all__ = ["UserDict"]
-
 class UserDict:
     def __init__(self, dict=None):
         self.data = {}
 """A more or less complete user-defined wrapper around list objects."""
 
-__all__ = ["UserList"]
-
 class UserList:
     def __init__(self, initlist=None):
         self.data = []
 
 """
 
-__all__ = ["error","open"]
-
 try:
     class error(Exception):
         pass
 """Bisection algorithms."""
 
-__all__ = ["bisect_right","insort_right","bisect_left","insort_left"]
-
 def insort_right(a, x, lo=0, hi=None):
     """Insert item x in list a, and keep it sorted assuming a is sorted.
 
 default is 1, i.e. aligned.
 """
 
-__all__ = ["Chunk"]
-
 class Chunk:
     def __init__(self, file, align = 1, bigendian = 1, inclheader = 0):
         import struct
 _os = __import__('os')
 import __builtin__
 
-__all__ = ["open"]
-
 _open = __builtin__.open
 
 _BLOCKSIZE = 512

Lib/htmlentitydefs.py

 """HTML character entity references."""
 
-__all__ = ["entitydefs"]
-
 entitydefs = {
     'AElig':    '\306',         # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
     'Aacute':   '\301',         # latin capital letter A with acute, U+00C1 ISOlat1
 for lock, where a function is called once the lock is aquired.
 """
 
-__all__ = ["mutex"]
-
 class mutex:
     def __init__(self):
         """Create a new mutex -- initially unlocked."""

Lib/nturl2path.py

 """Convert a NT pathname to a file URL and vice versa."""
 
-__all__ = ["url2pathname"]
-
 def url2pathname(url):
     r"""Convert a URL to a DOS path.
 
               query only
 """
 
-__all__ = ["open","fileopen","SEEK_SET","SEEK_CUR","SEEK_END"]
-
 class _posixfile_:
     """File wrapper class that provides extra POSIX file routines."""
 

Lib/regex_syntax.py

 RE_SYNTAX_EMACS = 0
 
 # (Python's obsolete "regexp" module used a syntax similar to awk.)
-
-__all__ = locals().keys()
-for _i in range(len(__all__)-1,-1,-1):
-    if __all__[_i][0] == "_":
-        del __all__[_i]
-del _i
 S_IROTH = 00004
 S_IWOTH = 00002
 S_IXOTH = 00001
-
-__all__ = locals().keys()
-for _i in range(len(__all__)-1,-1,-1):
-    if __all__[_i][0] == "_":
-        del __all__[_i]
-del _i
 F_FAVAIL  = 7           # Free nodes available to non-superuser
 F_FLAG    = 8           # Flags (see your local statvfs man page)
 F_NAMEMAX = 9           # Maximum file name length
-
-__all__ = locals().keys()
-for _i in range(len(__all__)-1,-1,-1):
-    if __all__[_i][0] == "_":
-        del __all__[_i]
-del _i
     letters = lowercase + uppercase
 except ImportError:
     pass                                          # Use the original versions
-
-__all__ = locals().keys()
-for _i in range(len(__all__)-1,-1,-1):
-    if __all__[_i][0] == "_":
-        del __all__[_i]
-del _i

Lib/test/test___all__.py

     verify(keys==all, "%s != %s" % (keys, all))
 
 check_all("BaseHTTPServer")
-check_all("Bastion")
 check_all("CGIHTTPServer")
 check_all("ConfigParser")
 check_all("Cookie")
 check_all("MimeWriter")
-check_all("Queue")
 check_all("SimpleHTTPServer")
 check_all("SocketServer")
 check_all("StringIO")
-check_all("UserDict")
-check_all("UserList")
 check_all("UserString")
 check_all("aifc")
-check_all("anydbm")
 check_all("atexit")
 check_all("audiodev")
 check_all("base64")
 check_all("bdb")
 check_all("binhex")
-check_all("bisect")
 check_all("calendar")
 check_all("cgi")
-check_all("chunk")
 check_all("cmd")
 check_all("code")
 check_all("codecs")
 check_all("dis")
 check_all("doctest")
 check_all("dospath")
-check_all("dumbdbm")
 check_all("filecmp")
 check_all("fileinput")
 check_all("fnmatch")
 check_all("glob")
 check_all("gopherlib")
 check_all("gzip")
-check_all("htmlentitydefs")
 check_all("htmllib")
 check_all("httplib")
 check_all("ihooks")
 check_all("mimetypes")
 check_all("mimify")
 check_all("multifile")
-check_all("mutex")
 check_all("netrc")
 check_all("nntplib")
 check_all("ntpath")
-check_all("nturl2path")
 check_all("os")
 check_all("pdb")
 check_all("pickle")
 check_all("pipes")
 check_all("popen2")
 check_all("poplib")
-check_all("posixfile")
 check_all("posixpath")
 check_all("pprint")
 check_all("pre")
 check_all("random")
 check_all("re")
 check_all("reconvert")
-check_all("regex_syntax")
 check_all("regsub")
 check_all("repr")
 check_all("rexec")
 check_all("socket")
 check_all("sre")
 check_all("sre_compile")
-check_all("sre_constants")
 check_all("sre_parse")
-check_all("stat")
 check_all("stat_cache")
-check_all("statvfs")
-check_all("string")