Ashley Anderson added the comment: Wow, I can't believe this issue is so old now! I'm motivated to finally come back and address the remaining issues to get this merged. Sorry for seemingly abandoning this; I'm embarrassed I didn't push to finish it earlier.
It sounds like the consensus is to raise a ValueError in cases where ambiguity may arise, with specific suggestions for resolving the ambiguity in each case. This is in contrast to certain other cases where strptime uses some default value for missing data (e.g. month/day = 1, year = 1900). Ambiguous or incomplete cases I have identified are: 1. ISO week (%V) is specified, but the year is specified with %Y instead of %G 2. ISO year (%G) and ISO week (%V) are specified, but a weekday is not 3. ISO year (%G) and weekday are specified, but ISO week (%V) is not 4. ISO year is specified alone (e.g. time.strptime('2015', '%G')) 5. Julian/ordinal day (%j) is specified with %G, but not %Y Hopefully that covers it...let me know if I need to add any cases or change behavior in any cases. I can have a patch (at least an initial attempt) ready for this in the next few days. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12006> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com