[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread SilentGhost
SilentGhost added the comment: new issue #11081 was created for struct.__all__ fix -- status: open -> closed ___ Python tracker ___ __

[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Wait, #8973 *is* this issue. But r81947 is clearly not only about docstrings. We definitely need a separate issue. This is too confusing. -- ___ Python tracker __

[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg127607 ___ Python tracker ___ ___ Python-bugs-list mail

[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Wait, #8973 *is* this issue. But r81947 is clearly not about docstrings. We definitely need a saparate issue. This is too confusing. -- ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The proposed patch looks fine to me, but it is attached to the wrong issue. It belongs to #8973 or better yet to follow RC2 rules pedantically, it should be posted in a separate issue. This is important, because this issue is limited to docstrings and

[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread SilentGhost
SilentGhost added the comment: r81947 introduced this issue: >>> from struct import * >>> pack_into Traceback (most recent call last): File "", line 1, in pack_into NameError: name 'pack_into' is not defined struct.__all__ has a duplicate entry and misses pack_into. Patch is attached,

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r81961. Yes, I used "format" for consistency with the manual, but on the second thought consistency within help() is more important. -- ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: Looks fine. I'd probably call the argument 'fmt' rather than 'format', for consistency. Please commit, with or without the 'format' -> 'fmt' change, as you choose. -- ___ Python tracker

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: How does issue8973-Struct.diff look? -- Added file: http://bugs.python.org/file17649/issue8973-Struct.diff ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: Apart from the pydoc __init__ issue, the Struct class documentation should probably be expanded a bit. At the moment, it's just: PyDoc_STRVAR(s__doc__, "Compiled struct object"); Alexander, interested in producing a patch? -- assignee: mark.dickinso

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See issue #8983 for the the __init__ doc discussion since it is not specific to the struct module. -- ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: Committed patch (with additional changes suggested by Alexander) in r81949. Only the __init__ doc issue remains. -- ___ Python tracker ___ ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: I also accidentally included the docstring changes in r81947; those were reverted in r81948. -- ___ Python tracker ___ ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: r81947 fixes the missing struct.Struct entry in struct.help. (pydoc was relying on the inspect module to correctly guess the module for struct.Struct, and inspect was getting it wrong. Adding __all__ to the struct module saves inspect from having to guess.)

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: calcsize() still does not have signature in docstring. A nit: maybe follow calcsize() lead and say "format string fmt" rather than just "fmt". One more __doc__ mention: in Struct docstring, | __init__(...) | x.__init__(...) initializes x; see

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: The docstrings need to be rewrapped to 72 characters; I'll do this once the wording is settled. -- ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file17642/issue8973.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file17643/issue8973.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: N.B. The patch doesn't fix the missing struct.Struct documentation issue; I'll look at that separately. -- ___ Python tracker ___

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch. Alexander, do you want to check it for sanity? -- keywords: +patch Added file: http://bugs.python.org/file17642/issue8973.patch ___ Python tracker

[issue8973] Inconsistent docstrings in struct module

2010-06-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the reports; I'll look at this a little later. -- assignee: -> mark.dickinson ___ Python tracker ___ __

[issue8973] Inconsistent docstrings in struct module

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Two more bits: 1. "See struct.__doc__", while technically correct, is not user friendly. If you copy struct.__doc__ to >>> prompt, you get an ugly repr of a multiline string. I suggest s/struct.__doc__/help(struct)/. 2. For some reason struct.Struct

[issue8973] Inconsistent docstrings in struct module

2010-06-11 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Module level pack, unpack etc. methods have similar functionality with Struct instance methods, but docs are different. The immediate issue is the lack of signature in the module level methods' docstrings. $ ./python.exe -m pydoc struct.Struct.pack