[issue7417] open builtin has no signature in docstring

2009-12-23 Thread Georg Brandl
Georg Brandl added the comment: Added signature from msg95885 in r77009. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue7417] open builtin has no signature in docstring

2009-12-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Georg, I'm a bit lost in the different suggestions. Your take? Do you have any preference? Or should we simply copy the docstring from _pyio's open() function? -- ___ Python tracker

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15441/issue7417_py3k_explicit.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
Changes by flox : Added file: http://bugs.python.org/file15442/issue7417_py3k_explicit.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
flox added the comment: (patch attached: explicit signature) I vote +1 for something more explicit. « Explicit is better than implicit. » >>> help(open) Help on built-in function open in module io: open(...) open(file_name_or_path) -> file object for reading in text mode open(file_nam

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
flox added the comment: Or I suggest something more verbose... >>> print(open.__doc__) open(filename) -> file object for reading in text mode open(filename, mode=binary[, buffering]) -> file object in binary mode open(filename[, mode=text][, buffering][,encoding][,errors][,newline])

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15436/issue7417_py3k.diff ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
flox added the comment: Ulrik, I agree that most builtins have the signature on first lines. I will not apply this part of the PEP257. But it seems that the "[...]" syntax is not enforced for all builtins. See "help(print)", "help(sorted)" and "help(__import__)" examples: >>> print(print.__do

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread Ulrik Sverdrup
Ulrik Sverdrup added the comment: import builtins; help(builtins) Looking around, the new suggestion is absolutely unconventional. The signature must be on the first line. One builtin function even uses two lines; min: min(iterable[, key=func]) -> value min(a, b, c, ...[, key=f

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
flox added the comment: Actually the docstring of _pyio.open Python function should not change. The patch is smaller. -- Added file: http://bugs.python.org/file15436/issue7417_py3k.diff ___ Python tracker

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15428/issue7417_py3k.diff ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7417] open builtin has no signature in docstring

2009-12-02 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15434/issue7417_py3k_pep257.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: According to PEP257: «Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.» Maybe this second patch is more conventional? -- Added file: http://bugs.python.org/file154

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: Indentation is not easy on this part. The list of arguments overflow the 79 chars limit. With the proposed patch, the generated output is something like: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) -> file obje

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread Georg Brandl
Georg Brandl added the comment: Make that "modulo." -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me (module indentation). -- assignee: -> pitrou nosy: +georg.brandl, pitrou ___ Python tracker ___

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: Proposed docstring patch. -- keywords: +patch nosy: +flox versions: +Python 3.2 Added file: http://bugs.python.org/file15428/issue7417_py3k.diff ___ Python tracker __

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread ulrik
New submission from ulrik : Python 3.1.1's open has no signature in the docstring so the documentation for this builtin function is unfortunately very confusing (IMO is missing the most important part). >>> help(open) open(...) Open file and return a stream. Raise IOError upon failure.