On 08/24/2015 03:18 PM, Alexander Belopolsky wrote:
On Mon, Aug 24, 2015 at 5:58 PM, Ethan Furman 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.

Why would you have to?  I am not suggesting that None be the default, simply 
that it be available.

--
~Ethan~
_______________________________________________
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