Jessica McKellar added the comment:
Thanks for the patch, Michael!
There's a small doc build issue with your patch: the note on int shows up
inside the code block for the examples.
In response to rhettinger's feedback I've attached a slightly more compact
patch that hits the highlights. I
Raymond Hettinger added the comment:
Approved. You can go ahead and apply this.
--
assignee: rhettinger - jesstess
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 464c22bf9fe1 by Antoine Pitrou in branch '3.3':
Close #16665: improve documentation for hex(). Patch by Jessica McKellar.
http://hg.python.org/cpython/rev/464c22bf9fe1
New changeset d14beaf03f55 by Antoine Pitrou in branch '2.7':
Close #16665:
Antoine Pitrou added the comment:
Jessica doesn't have commit rights, so I committed this myself.
Also added an example of the funny hex(long) behaviour in Python 2.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
Michael Dickens added the comment:
I used the wording suggested by rurpy with some changes. I also added a few
examples.
--
keywords: +patch
nosy: +MTGandP
Added file: http://bugs.python.org/file30882/issue16665.diff
___
Python tracker
Raymond Hettinger added the comment:
Personally, I think this is overkill. Can you capture the essence of what you
want to say in something short and sweet that gets to the point? We're not
looking for a complete spec. You just need to say basically what the function
does.
--
Changes by Martin Kysel mar...@martinkysel.com:
--
nosy: +mkysel
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
___
Python-bugs-list
rurpy added the comment:
I would like to submit the following post made to c.l.p in support of my claim
that a cross-reference to the string formatting x format specifier would be
desireable in the documentation for the hex() builtin:
Newsgroups: comp.lang.python
Subject: Re: Integer as
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
___
Python-bugs-list
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
___
Python-bugs-list
rurpy added the comment:
An ammendment to my proposed doc change.
Replace the text (which is unchanged from the current doc),
...the result is a valid Python expression
with,
...the result is a valid Python hexinteger literal (see link:[Python Lang
Ref, sec 2.4.4. Integer literals])
rurpy added the comment:
Raymond Hettinger (rhettinger) msg177365:
For some of the points, a couple examples will do a better job of explaining
hex() that trying to write-out the full code specification in prose.
Examples should never substitute for a clear, complete and concise
New submission from rurpy the second:
The documentation of the hex() builtin function is poor. Specifically it does
not say (directly) that:
1. The resulting string is prefixed with 0x.
2. Any a-f characters used are lower case.
3. Negative integers are converted by prefixing a minus sign
Ezio Melotti added the comment:
+1
--
keywords: +easy
nosy: +ezio.melotti
stage: - needs patch
type: - enhancement
versions: -Python 2.6, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
Raymond Hettinger added the comment:
-1 for the suggested text.
For some of the points, a couple examples will do a better job of explaining
hex() that trying to write-out the full code specification in prose.
Overly wordy documentation is harder to use than something short that addresses
Ezio Melotti added the comment:
FTR my +1 was about the suggestion, not the proposed text.
The first 3 points can be explained with an example, the last 2 can be added in
the prose. I also agree that notes are not necessary (especially if they use
the note rst directive).
--
17 matches
Mail list logo