Éric Araujo added the comment:
Any reason to not backport this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 3a0acdc25cca by Alexander Belopolsky in branch 'default':
Issue #9650: List commonly used format codes in time.strftime and time.strptime
docsttings.
http://hg.python.org/cpython/rev/3a0acdc25cca
--
nosy: +python-dev
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
Éric Araujo added the comment:
Christian, did you ask on python-dev about your idea?
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
Alexander Belopolsky added the comment:
Christian's or rather Skip's idea is covered by Issue 3173. This was discussed
several times on python-dev.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
Changes by Brian Curtin br...@python.org:
--
nosy: -brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
___
Python-bugs-list
Mike Hoy added the comment:
Changed docstring for timemodule.c to include format codes listed here:
http://bugs.python.org/msg169193
--
keywords: +patch
Added file: http://bugs.python.org/file27358/issue9650-format-codes.diff
___
Python tracker
Ezio Melotti added the comment:
The patch contains non-ascii apostrophes: s/Locale’s/Locale's/
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
Mike Hoy added the comment:
Updated patch as per Ezio's comment.
--
Added file: http://bugs.python.org/file27364/issue9650-format-codes_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
Chris Rebert added the comment:
I'm going to bikeshed and again suggest that %I and %p be included for handling
12-hour clock times.
Also, the patch seems to only be for strftime(), and not strptime().
--
___
Python tracker rep...@bugs.python.org
Mike Hoy added the comment:
New patch includes time.strptime and the additional changes suggested by Chris
Rebert.
--
Added file: http://bugs.python.org/file27365/issue9650-format-codes_v3.diff
___
Python tracker rep...@bugs.python.org
Chris Rebert added the comment:
This is now hardcore nitpicking, but I'm conflicted as to whether %p should be
grouped with the other locale-related codes or with %I (since it's hard to
imagine using %I or %p in a singleton capacity).
In any case, props to Mike for putting an actual patch
Mike Hoy added the comment:
If you like my idea we should discuss it on python-ideas and start a new
tracker entry.
In the meantime I'd like to create a patch that incorporates Alexander's ideas.
If any objections let me know.
--
nosy: +mikehoy
Christian Heimes added the comment:
If we want to archive platform independence from the libc's strftime() and
strptime() function and its bugs, we could include our own implementation. Or
rather than writing our own code we may be able to include some working and
well tested code.
BSD's
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
___
Python-bugs-list
Alexander Belopolsky added the comment:
I would like to add my +1 to this issue. I suggest adding something like this:
Commonly used format codes:
%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
Chris Rebert added the comment:
+1 on including am/pm-related codes. Blame us backwards, non-metric Americans.
Sounds GTM otherwise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
Changes by Santoso Wijaya santoso.wij...@gmail.com:
--
assignee: - docs@python
components: +Documentation -Library (Lib)
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
Changes by Skip Montanaro s...@pobox.com:
--
nosy: -skip.montanaro
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
___
Python-bugs-list
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +d...@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9650
___
___
Python-bugs-list
Catherine Devlin fredv8vi...@liquidid.net added the comment:
Did my suggestion to alter pydoc output so it always contains a link to the
enclosing module's documentation not seem like a reasonable compromise?
I actually don't understand how that would help. The ``pydoc time`` output
doesn't
Skip Montanaro s...@pobox.com added the comment:
Did my suggestion to alter pydoc output so it always contains a link
to the enclosing module's documentation not seem like a reasonable
compromise?
Catherine I actually don't understand how that would help. The ``pydoc
Catherine Devlin fredv8vi...@liquidid.net added the comment:
There is the non-zero cost of keeping two copies of that bit of
information in-sync with each other (and the code).
That's true, but how often do the strftime format codes change? I'd be happy
to personally volunteer to keep them
Skip Montanaro s...@pobox.com added the comment:
Catherine,
Did my suggestion to alter pydoc output so it always contains a link to the
enclosing module's documentation not seem like a reasonable compromise?
Another problem with embedding the format codes in the docstring is that it
opens up a
New submission from Catherine Devlin fredv8vi...@liquidid.net:
Is there any reason not to include the strftime formatting codes in the
docstrings of time.strftime and time.strptime?
print time.strftime.__doc__
strftime(format[, tuple]) - string
Convert a time tuple to a string according to
Brian Curtin cur...@acm.org added the comment:
+1
These are apparently so commonly looked up that there are even two websites
dedicated to these options: http://strftime.org/ and http://strfti.me/. Even
Sauce Labs put the format options on the side of the coffee mugs they handed
out at
Skip Montanaro s...@pobox.com added the comment:
There is the non-zero cost of keeping two copies of that bit of
information in-sync with each other (and the code).
If I execute pydoc time I get a link to the online module
docs. It's not there when I execute pydoc time.strftime.
Perhaps pydoc
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Is there any reason not to include the strftime formatting codes
in the docstrings of time.strftime and time.strptime?
I believe the reason is that time.strftime behavior is platform dependent, so
man strftime is
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
there are even two websites dedicated to these options:
http://strftime.org/ ...
Note the source at one of these sites:
Source: Python’s strftime documentation. :-)
--
___
29 matches
Mail list logo