homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients belopolsky, eric.smith, matrixise, mjsaah, p-ganssle, pablogsal, terry.reedy, thatiparthy, vstinner, xtreak
Date 2019年01月09日.16:39:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547051946.05.0.551324776747.issue35066@roundup.psfhosted.org>
In-reply-to
Content
Paul Ganssle asked me to look at PR 10692. This issue is about consistency, so I don't understand this part of the change:
 try:
 _time.strftime('%')
 except ValueError:
self.skipTest('time module does not support trailing %')
Would why datetime have the same behavior on all platforms, but time.strftime('%') may or may not raise an exception depending on the libc?
Can't we get the same behavior on all platforms and the same behavior in time and datetime module. Honestly, I have no preference between always raising an exception or always success (just copy trailing "%").
This issue reminds me the old bpo-16322: time.strftime("%z") fails to format properly the timezone name. I would suggest to "preprocess" the input string passed to the C function strftime() / wcsftime() to replace %z or %Z with the timezone name, but only pass format substrings?
Something similar can be done for the trailing "%": pass a substring (without the trailing %) to strftime() / wcsftime(), and later append "%".
History
Date User Action Args
2019年01月09日 16:39:07vstinnersetrecipients: + vstinner, terry.reedy, belopolsky, eric.smith, matrixise, thatiparthy, p-ganssle, pablogsal, xtreak, mjsaah
2019年01月09日 16:39:06vstinnersetmessageid: <1547051946.05.0.551324776747.issue35066@roundup.psfhosted.org>
2019年01月09日 16:39:06vstinnerlinkissue35066 messages
2019年01月09日 16:39:05vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /