Skip to content

Commit c62c81e

Browse files
author
Skip Montanaro
committed
__all__ for several more modules
1 parent 81b6ae7 commit c62c81e

File tree

12 files changed

+35
-0
lines changed

12 files changed

+35
-0
lines changed

Lib/poplib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import re, socket
1616

17+
__all__ = ["POP3","error_proto"]
18+
1719
# Exception raised when an error or invalid response is received:
1820

1921
class error_proto(Exception): pass

Lib/posixfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
query only
5454
"""
5555

56+
__all__ = ["open","fileopen","SEEK_SET","SEEK_CUR","SEEK_END"]
57+
5658
class _posixfile_:
5759
"""File wrapper class that provides extra POSIX file routines."""
5860

Lib/posixpath.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
import os
1414
import stat
1515

16+
__all__ = ["normcase","isabs","join","splitdrive","split","splitext",
17+
"basename","dirname","commonprefix","getsize","getmtime",
18+
"getatime","islink","exists","isdir","isfile","ismount",
19+
"walk","expanduser","expandvars","normpath","abspath",
20+
"samefile","sameopenfile","samestat"]
1621

1722
# Normalize the case of a pathname. Trivial in Posix, string.lower on Mac.
1823
# On MS-DOS this may also turn slashes into backslashes; however, other

Lib/pprint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
except ImportError:
4242
from StringIO import StringIO
4343

44+
__all__ = ["pprint","pformat","isreadable","isrecursive","saferepr",
45+
"PrettyPrinter"]
4446

4547
def pprint(object, stream=None):
4648
"""Pretty-print a Python object to a stream [default is sys.sydout]."""

Lib/pre.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
import sys
8888
from pcre import *
8989

90+
__all__ = ["match","search","sub","subn","split","findall","escape","compile"]
91+
9092
#
9193
# First, the public part of the interface:
9294
#

Lib/profile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import time
4141
import marshal
4242

43+
__all__ = ["run","help","Profile"]
4344

4445
# Sample timer for use with
4546
#i_count = 0

Lib/pstats.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
import fpformat
4141

42+
__all__ = ["Stats"]
43+
4244
class Stats:
4345
"""This class is used for creating reports from data generated by the
4446
Profile class. It is a "friend" of that class, and imports data either

Lib/pty.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import os, FCNTL
1111
import tty
1212

13+
__all__ = ["openpty","fork","spawn"]
14+
1315
STDIN_FILENO = 0
1416
STDOUT_FILENO = 1
1517
STDERR_FILENO = 2

Lib/py_compile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import imp
77
MAGIC = imp.get_magic()
88

9+
__all__ = ["compile"]
10+
911
def wr_long(f, x):
1012
"""Internal; write a 32-bit int to a file in little-endian order."""
1113
f.write(chr( x & 0xff))

Lib/pyclbr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class MyClass(subpackage.SuperClass):
5959
import re
6060
import string
6161

62+
__all__ = ["readmodule"]
63+
6264
TABWIDTH = 8
6365

6466
_getnext = re.compile(r"""

Lib/quopri.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
# (Dec 1991 version).
66

7+
__all__ = ["encode","decode"]
8+
79
ESCAPE = '='
810
MAXLINESIZE = 76
911
HEX = '0123456789ABCDEF'

Lib/test/test___all__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,15 @@ def check_all(modname):
9999
check_all("pickle")
100100
check_all("pipes")
101101
check_all("popen2")
102+
check_all("poplib")
103+
check_all("posixfile")
104+
check_all("posixpath")
105+
check_all("pprint")
106+
check_all("pre")
107+
check_all("profile")
108+
check_all("pstats")
109+
check_all("pty")
110+
check_all("py_compile")
111+
check_all("pyclbr")
112+
check_all("quopri")
102113
check_all("robotparser")

0 commit comments

Comments
 (0)