Mathieu Dupuy added the comment:

The real question is : should we accept whatever iso8601 format is common to be 
found on the internet, or just be able to consume back the string issued by 
isoformat. From that results the answers to the questions you're asking: don't 
accept single digits, neither second-less datetime, ...
I don't really mind what the answer is. I'm OK for a stricter acceptance. I 
would like to ask ourselves : does a simpler, stricter implementation fulfill 
people needs ? If it's OK for you, it's OK for me.

By taking the Django version, I deviated the bit from the author's original 
need which was just being able to parse back datetime isoformat. The 
limitations he raises for not using strptime are gone now (strptime understand 
timezone), but it still can't understand microseconds nor optional parts (T or 
space for separator, optional microseconds). Even for a much simpler, stricter 
implementation, I'd like to stick with regex.

I'll do a date & time version, I just wait that we fall agree on the whole 
datetime thing.

Wether we change to a simpler code or keep it this way, I can rewrite tests & 
docstring.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to