Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(162280)

#26267: UUID docs should say how to get "standard form"

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 5 months ago by abarnert
Modified:
3 years ago
Reviewers:
efmphone, berker.peksag, ammar
CC:
Georg, docs_python.org, devnull_psf.upfronthosting.co.za, berkerpeksag, abarnert, tuxtimo_gmail.com, ammar2
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 4

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/uuid.rst View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 6
Evelyn Mitchell
str() does not return the uuid within {}, line 53 should be changed to show ...
3 years, 4 months ago #1
Evelyn Mitchell
Thanks for adding the comparison at 56:58, that's a significant thing to know.
3 years, 4 months ago #2
berkerpeksag
http://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst File Doc/library/uuid.rst (right): http://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst#newcode51 Doc/library/uuid.rst:51: .. describe:: str(uuid) It would be better to be ...
3 years, 4 months ago #3
ammar2
https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst File Doc/library/uuid.rst (right): https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst#newcode56 Doc/library/uuid.rst:56: .. describe:: uuid1 == uuid2 On 2016/08/03 10:09:25, berkerpeksag ...
3 years, 4 months ago #4
berkerpeksag
https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst File Doc/library/uuid.rst (right): https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst#newcode56 Doc/library/uuid.rst:56: .. describe:: uuid1 == uuid2 On 2016/08/06 05:20:17, ammar2 ...
3 years, 2 months ago #5
ammar2
3 years ago #6
On 2016/09/11 09:12:18, berkerpeksag wrote:
> https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst
> File Doc/library/uuid.rst (right):
> 
> https://bugs.python.org/review/26267/diff/18046/Doc/library/uuid.rst#newcode56
> Doc/library/uuid.rst:56: .. describe:: uuid1 == uuid2
> On 2016/08/06 05:20:17, ammar2 wrote:
> > On 2016/08/03 10:09:25, berkerpeksag wrote:
> > > Same as above. See datetime or decimal documentations for an example of
how
> to
> > > document comparison operations.
> > 
> > So datetime takes the approach of documenting operators in a table
(presumably
> > because it has a lot of ops)
> > https://docs.python.org/3/library/datetime.html#datetime.date.day
> > 
> > decimal seems to do it in  this way
> > https://docs.python.org/3/library/decimal.html#decimal.Decimal.compare
> > 
> > The style I used here is from
> > https://docs.python.org/3/library/stdtypes.html#set but now that I look at
it,
> > within the stdtypes there's also the datetime style operator documentation
for
> > numbers.
> >
>
https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex
> > 
> > Is there a preferred style for documenting operators? Which one should I use
> > here?
> > 
> > (apparently I forgot to click the publish button on Rietveld, I wrote this
day
> > before yesterday)
> 
> Sorry, I wasn't very clear in my earlier message. I was referring to the
> following paragraph in datetime documentation:
> 
>     Comparisons of timedelta objects are supported with the timedelta object
> representing the smaller duration considered to be the smaller timedelta. In
> order to stop mixed-type comparisons from falling back to the default
comparison
> by object address, when a timedelta object is compared to an object of a
> different type, TypeError is raised unless the comparison is == or !=. The
> latter cases return False or True, respectively.
> 
> https://docs.python.org/3/library/datetime.html#timedelta-objects
> 
> In other words, instead of using too much markup, it would be nice to document
> that it supports comparison operators in prose.

I've updated it so the comparison operators are explain in prose but there's
still markup for the str() operator.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+