Message333331
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 "%". |
|
Date |
User |
Action |
Args |
2019-01-09 16:39:07 | vstinner | set | recipients:
+ vstinner, terry.reedy, belopolsky, eric.smith, matrixise, thatiparthy, p-ganssle, pablogsal, xtreak, mjsaah |
2019-01-09 16:39:06 | vstinner | set | messageid: <1547051946.05.0.551324776747.issue35066@roundup.psfhosted.org> |
2019-01-09 16:39:06 | vstinner | link | issue35066 messages |
2019-01-09 16:39:05 | vstinner | create | |
|