]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merge updates about dir() with 3.3.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Nov 2012 10:56:29 +0000 (12:56 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Nov 2012 10:56:29 +0000 (12:56 +0200)
1  2 
Doc/tutorial/modules.rst

index 15b80943850d4bac666a68a57c72134ef5f4e1a6,c4d86ac31f6ccc8e84c8716f0417236e517d243b..3a3283dc65f4c10dbba6b16d22cdc4ec87e158a9
@@@ -288,17 -288,25 +288,24 @@@ defines.  It returns a sorted list of s
     >>> import fibo, sys
     >>> dir(fibo)
     ['__name__', 'fib', 'fib2']
-    >>> dir(sys)
-    ['__displayhook__', '__doc__', '__excepthook__', '__name__', '__stderr__',
-     '__stdin__', '__stdout__', '_getframe', 'api_version', 'argv',
-     'builtin_module_names', 'byteorder', 'callstats', 'copyright',
-     'displayhook', 'exc_info', 'excepthook',
-     'exec_prefix', 'executable', 'exit', 'getdefaultencoding', 'getdlopenflags',
-     'getrecursionlimit', 'getrefcount', 'hexversion', 'maxint', 'maxunicode',
-     'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache',
-     'platform', 'prefix', 'ps1', 'ps2', 'setcheckinterval', 'setdlopenflags',
-     'setprofile', 'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout',
-     'version', 'version_info', 'warnoptions']
+    >>> dir(sys)  # doctest: +NORMALIZE_WHITESPACE
 -   ['__displayhook__', '__doc__', '__egginsert', '__excepthook__',
 -    '__loader__', '__name__', '__package__', '__plen', '__stderr__',
 -    '__stdin__', '__stdout__', '_clear_type_cache', '_current_frames',
 -    '_debugmallocstats', '_getframe', '_home', '_mercurial', '_xoptions',
 -    'abiflags', 'api_version', 'argv', 'base_exec_prefix', 'base_prefix',
 -    'builtin_module_names', 'byteorder', 'call_tracing', 'callstats',
 -    'copyright', 'displayhook', 'dont_write_bytecode', 'exc_info',
 -    'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info',
 -    'float_repr_style', 'getcheckinterval', 'getdefaultencoding',
 -    'getdlopenflags', 'getfilesystemencoding', 'getobjects', 'getprofile',
 -    'getrecursionlimit', 'getrefcount', 'getsizeof', 'getswitchinterval',
 -    'gettotalrefcount', 'gettrace', 'hash_info', 'hexversion',
 -    'implementation', 'int_info', 'intern', 'maxsize', 'maxunicode',
 -    'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache',
 -    'platform', 'prefix', 'ps1', 'setcheckinterval', 'setdlopenflags',
 -    'setprofile', 'setrecursionlimit', 'setswitchinterval', 'settrace',
 -    'stderr', 'stdin', 'stdout', 'thread_info', 'version', 'version_info',
 -    'warnoptions']
++   ['__displayhook__', '__doc__', '__excepthook__', '__loader__', '__name__',
++    '__package__', '__stderr__', '__stdin__', '__stdout__',
++    '_clear_type_cache', '_current_frames', '_debugmallocstats', '_getframe',
++    '_home', '_mercurial', '_xoptions', 'abiflags', 'api_version', 'argv',
++    'base_exec_prefix', 'base_prefix', 'builtin_module_names', 'byteorder',
++    'call_tracing', 'callstats', 'copyright', 'displayhook',
++    'dont_write_bytecode', 'exc_info', 'excepthook', 'exec_prefix',
++    'executable', 'exit', 'flags', 'float_info', 'float_repr_style',
++    'getcheckinterval', 'getdefaultencoding', 'getdlopenflags',
++    'getfilesystemencoding', 'getobjects', 'getprofile', 'getrecursionlimit',
++    'getrefcount', 'getsizeof', 'getswitchinterval', 'gettotalrefcount',
++    'gettrace', 'hash_info', 'hexversion', 'implementation', 'int_info',
++    'intern', 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path',
++    'path_hooks', 'path_importer_cache', 'platform', 'prefix', 'ps1',
++    'setcheckinterval', 'setdlopenflags', 'setprofile', 'setrecursionlimit',
++    'setswitchinterval', 'settrace', 'stderr', 'stdin', 'stdout',
++    'thread_info', 'version', 'version_info', 'warnoptions']
  
  Without arguments, :func:`dir` lists the names you have defined currently::