>>> import zlib
>>> d = zlib.decompressobj()
>>> d
<zlib.Decompress object at 0xb70a9288>
>>> c = zlib.compressobj()
>>> c
<zlib.Compress object at 0xb6f85ac8>
>>> zlib.DEF_BUF_SIZE
16384
>>> zlib.Z_FINISH
4
>>> help(c)
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2243, in wrap_value
value = eval(s, module_dict)
File "<string>", line 1, in <module>
NameError: name 'Z_FINISH' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2246, in wrap_value
value = eval(s, sys_module_dict)
File "<string>", line 1, in <module>
NameError: name 'Z_FINISH' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 99, in __call__
return pydoc.help(*args, **kwds)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1799, in __call__
self.help(request)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1849, in help
else: doc(request, 'Help on %s:', output=self._output)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1585, in doc
pager(render_doc(thing, title, forceload))
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 357, in document
if inspect.isclass(object): return self.docclass(*args)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1276, in docclass
lambda t: t[1] == 'method')
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1225, in spill
name, mod, object))
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 358, in document
if inspect.isroutine(object): return self.docroutine(*args)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1328, in docroutine
signature = inspect.signature(object)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 1695, in signature
return Signature.from_builtin(obj)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2298, in from_builtin
p(name, default)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2284, in p
default_node = RewriteSymbolics().visit(default_node)
File "/home/serhiy/py/cpython/Lib/ast.py", line 245, in visit
return visitor(node)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2276, in visit_Name
return wrap_value(node.id)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2248, in wrap_value
raise RuntimeError()
RuntimeError
>>> help(d)
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2243, in wrap_value
value = eval(s, module_dict)
File "<string>", line 1, in <module>
NameError: name 'DEF_BUF_SIZE' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2246, in wrap_value
value = eval(s, sys_module_dict)
File "<string>", line 1, in <module>
NameError: name 'DEF_BUF_SIZE' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 99, in __call__
return pydoc.help(*args, **kwds)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1799, in __call__
self.help(request)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1849, in help
else: doc(request, 'Help on %s:', output=self._output)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1585, in doc
pager(render_doc(thing, title, forceload))
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 357, in document
if inspect.isclass(object): return self.docclass(*args)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1276, in docclass
lambda t: t[1] == 'method')
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1225, in spill
name, mod, object))
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 358, in document
if inspect.isroutine(object): return self.docroutine(*args)
File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1328, in docroutine
signature = inspect.signature(object)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 1695, in signature
return Signature.from_builtin(obj)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2298, in from_builtin
p(name, default)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2284, in p
default_node = RewriteSymbolics().visit(default_node)
File "/home/serhiy/py/cpython/Lib/ast.py", line 245, in visit
return visitor(node)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2276, in visit_Name
return wrap_value(node.id)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 2248, in wrap_value
raise RuntimeError()
RuntimeError |