Paul Ganssle <p.gans...@gmail.com> added the comment:

> The other difference is Mattieu guarantees ValueError for invalid input 
> strings, which I think is good.

I forgot to address this - but I don't think this is a difference in 
approaches. If you pass `None` or an int or something, the problem is with the 
type, not the value, so at a minimum you're looking at TypeError and ValueError 
- and those are the only exceptions raised in my patch.

(I'll note that my patch does not accept bytes, though this is something of an 
artificial limitation, since the patch makes use of the fact that all valid 
isoformat() strings will contain at most exactly 1 non-ascii character in 
position 10, so we could easily work around this, but I think the trend for 
CPython is to avoid blurring the lines between bytes and str rather than 
encouraging their interchangeable use.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://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