homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients barry, brett.cannon, gvanrossum, larry, meador.inge, ncoghlan, skrah, tim.peters, yselivanov, zach.ware
Date 2014年01月17日.22:12:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389996721.21.0.785131494091.issue20189@psf.upfronthosting.co.za>
In-reply-to
Content
A few issues with this patch:
1) help(os) raises ValueError
"""
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "P:\ath\to\cpython\lib\_sitebuiltins.py", line 99, in __call__
 return pydoc.help(*args, **kwds)
 File "P:\ath\to\cpython\lib\pydoc.py", line 1792, in __call__
 self.help(request)
 File "P:\ath\to\cpython\lib\pydoc.py", line 1842, in help
 else: doc(request, 'Help on %s:', output=self._output)
 File "P:\ath\to\cpython\lib\pydoc.py", line 1578, in doc
 pager(render_doc(thing, title, forceload))
 File "P:\ath\to\cpython\lib\pydoc.py", line 1571, in render_doc
 return title % desc + '\n\n' + renderer.document(object, name)
 File "P:\ath\to\cpython\lib\pydoc.py", line 356, in document
 if inspect.ismodule(object): return self.docmodule(*args)
 File "P:\ath\to\cpython\lib\pydoc.py", line 1142, in docmodule
 contents.append(self.document(value, key, name))
 File "P:\ath\to\cpython\lib\pydoc.py", line 358, in document
 if inspect.isroutine(object): return self.docroutine(*args)
 File "P:\ath\to\cpython\lib\pydoc.py", line 1323, in docroutine
 signature = inspect.signature(object)
 File "P:\ath\to\cpython\lib\inspect.py", line 1551, in signature
 raise ValueError(msg)
ValueError: no signature found for builtin function <built-in function abort>
"""
2) help(pickle.dump) shows "module" as the first argument. Of course, that's true in C, but not in Python. This is the same for all module-level builtins.
"""
>>> help(pickle.dump)
Help on built-in function dump in module _pickle:
dump(module, obj, file, protocol=None, *, fix_imports=True)
 Write a pickled representation of obj to the open file object file.
<etc.>
>>> pickle.dump.__text_signature__
'(module, obj, file, protocol=None, *, fix_imports=True)'
"""
3) A module-level function with a positional-only parameter named 'module' in the first position causes an assertion error:
Clinic block:
"""
/*[clinic input]
_winapi.GetModuleFileName
 module: HMODULE
 /
Return the fully-qualified path for the file that contains module.
<etc>
[clinic start generated code]*/
"""
Traceback:
"""
P:\ath\to\cpython>PCbuild\python_d.exe Tools\clinic\clinic.py Modules\_winapi.c
Error in file "Modules\_winapi.c" on line 1299:
Exception raised during parsing:
Traceback (most recent call last):
 File "Tools\clinic\clinic.py", line 1099, in parse
 parser.parse(block)
 File "Tools\clinic\clinic.py", line 2283, in parse
 self.state(None)
 File "Tools\clinic\clinic.py", line 3022, in state_terminal
 self.function.docstring = self.format_docstring()
 File "Tools\clinic\clinic.py", line 2847, in format_docstring
 assert isinstance(parameters[0].converter, self_converter)
AssertionError
"""
History
Date User Action Args
2014年01月17日 22:12:01zach.waresetrecipients: + zach.ware, gvanrossum, tim.peters, barry, brett.cannon, ncoghlan, larry, skrah, meador.inge, yselivanov
2014年01月17日 22:12:01zach.waresetmessageid: <1389996721.21.0.785131494091.issue20189@psf.upfronthosting.co.za>
2014年01月17日 22:12:01zach.warelinkissue20189 messages
2014年01月17日 22:12:01zach.warecreate

AltStyle によって変換されたページ (->オリジナル) /