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 Erik Cederstrand
Recipients AaronR, Alex.Willmer, BreamoreBoy, Erik Cederstrand, Erik.Cederstrand, aganders3, belopolsky, r.david.murray, tim.peters
Date 2014年09月24日.07:17:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411543066.71.0.67432007195.issue12006@psf.upfronthosting.co.za>
In-reply-to
Content
I don't have the repo handy to make a patch against 3.5, but would an addition like this do?
in Lib/_strptime.py:
+ elif iso_week != -1 and iso_year == -1:
+ raise ValueError("'%Y' directive is ambiguous in combination with '%V'. Use '%G' instead.")
+ elif julian == -1 and iso_week != -1 and iso_weekday != -1:
+ year, julian = _calc_julian_from_V(iso_year, iso_week, iso_weekday)
In Lib/test/test_strptime.py:
 def test_ValueError(self):
+ # Make sure ValueError is raised when match fails or format is bad
+ self.assertRaises(ValueError, _strptime._strptime, data_string="1905 52",
+ format="%Y %V")
History
Date User Action Args
2014年09月24日 07:17:46Erik Cederstrandsetrecipients: + Erik Cederstrand, tim.peters, belopolsky, r.david.murray, BreamoreBoy, Erik.Cederstrand, AaronR, aganders3, Alex.Willmer
2014年09月24日 07:17:46Erik Cederstrandsetmessageid: <1411543066.71.0.67432007195.issue12006@psf.upfronthosting.co.za>
2014年09月24日 07:17:46Erik Cederstrandlinkissue12006 messages
2014年09月24日 07:17:46Erik Cederstrandcreate

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