On Mon, Aug 24, 2015 at 5:58 PM, Ethan Furman <[email protected]> wrote:

>     try:
>          some_date = get_a_datetime_from_somewhere(ltdf=None)
>     except AmbiguousTimeError, NonExistentTimeError as e:
>          log(weird_time_error, e)
>          some_date = use_default(e.datetime)
>
> ..
> Writing functions to work around short-comings is not how I like to spend
> my time (see my contention above about library code).
>

Neither do I.  That's why in my code you are more likely to see

some_date = get_a_datetime_from_somewhere()

instead of the wall of text that you presented.  As you can imagine, I will
not be happy facing a prospect of adding try:.. except's everywhere to port
my code to Python 3.6.
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to