summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorXtreak <tir.karthi@gmail.com>2019-06-25 12:16:55 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-06-25 12:16:54 (GMT)
commit080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9 (patch)
tree0715af1d6b18c4c6f0d75e5869a3d83219f10392 /Doc/tutorial
parent9cb274114c844f9b1c13028f812926c987a7b4a7 (diff)
downloadcpython-080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9.zip
cpython-080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9.tar.gz
cpython-080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9.tar.bz2
bpo-37392: Update the dir(sys) in module tutorial (GH-14365)
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/modules.rst36
1 files changed, 20 insertions, 16 deletions
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index d0a68fa..af595e5 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -306,23 +306,27 @@ defines. It returns a sorted list of strings::
>>> dir(fibo)
['__name__', 'fib', 'fib2']
>>> dir(sys) # doctest: +NORMALIZE_WHITESPACE
- ['__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',
+ ['__breakpointhook__', '__displayhook__', '__doc__', '__excepthook__',
+ '__interactivehook__', '__loader__', '__name__', '__package__', '__spec__',
+ '__stderr__', '__stdin__', '__stdout__', '__unraisablehook__',
+ '_clear_type_cache', '_current_frames', '_debugmallocstats', '_framework',
+ '_getframe', '_git', '_home', '_xoptions', 'abiflags', 'addaudithook',
+ 'api_version', 'argv', 'audit', 'base_exec_prefix', 'base_prefix',
+ 'breakpointhook', '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', 'get_asyncgen_hooks', 'get_coroutine_origin_tracking_depth',
+ 'getallocatedblocks', 'getdefaultencoding', 'getdlopenflags',
+ 'getfilesystemencodeerrors', 'getfilesystemencoding', 'getprofile',
+ 'getrecursionlimit', 'getrefcount', 'getsizeof', 'getswitchinterval',
'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']
+ 'intern', 'is_finalizing', 'last_traceback', 'last_type', 'last_value',
+ 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks',
+ 'path_importer_cache', 'platform', 'prefix', 'ps1', 'ps2', 'pycache_prefix',
+ 'set_asyncgen_hooks', 'set_coroutine_origin_tracking_depth', 'setdlopenflags',
+ 'setprofile', 'setrecursionlimit', 'setswitchinterval', 'settrace', 'stderr',
+ 'stdin', 'stdout', 'thread_info', 'unraisablehook', 'version', 'version_info',
+ 'warnoptions']
Without arguments, :func:`dir` lists the names you have defined currently::