no.append(x)
return yes, no
- def visiblename(name, all=None):
+ def visiblename(name, all=None, obj=None):
"""Decide whether to show documentation on a variable."""
# Certain special names are redundant.
- _hidden_names = ('__builtins__', '__doc__', '__file__', '__path__',
+ if name in {'__builtins__', '__doc__', '__file__', '__path__',
'__module__', '__name__', '__slots__', '__package__',
'__cached__', '__author__', '__credits__', '__date__',
- '__version__')
- if name in _hidden_names: return 0
+ '__version__'}:
+ return 0
# Private names are hidden, but special names are displayed.
if name.startswith('__') and name.endswith('__'): return 1
+ # Namedtuples have public fields and methods with a single leading underscore
+ if name.startswith('_') and hasattr(obj, '_fields'):
+ return True
if all is not None:
# only document that which the programmer exported in __all__
return name in all
Library
-------
-- Issue #11628: cmp_to_key generated class should use __slots__
+- Issue #6811: Allow importlib to change a code object's co_filename attribute
+ to match the path to where the source code currently is, not where the code
+ object originally came from.
+
+- Issue #8754: Have importlib use the repr of a module name in error messages.
+
+- Issue #11591: Prevent "import site" from modifying sys.path when python
+ was started with -S.
+
+- collections.namedtuple() now adds a _source attribute to the generated
+ class. This make the source more accessible than the outdated
+ "verbose" option which prints to stdout but doesn't make the source
+ string available.
+
+- Issue #11371: Mark getopt error messages as localizable. Patch by Filip
+ GruszczyĆski.
+
+- Issue #11333: Add __slots__ to collections ABCs.
+
+- Issue #11628: cmp_to_key generated class should use __slots__.
+ - Issue #11666: let help() display named tuple attributes and methods
+ that start with a leading underscore.
+
- Issue #5537: Fix time2isoz() and time2netscape() functions of
httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.