Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

Is 3.3 message better?

>>> datetime.now(tz=X())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: offset must be a timedelta strictly between -timedelta(hours=24) 
and timedelta(hours=24).

In 2.7, the message is indeed misleading:

>>> datetime.now(tz=X())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: tzinfo.utcoffset() returned 1440; must be in -1439 .. 1439

I am not sure fixing this in 2.x is worth the trouble, but I would consider 
improving the message in 3.x by adding information about the actual offset.  I 
vaguely remember that there was a reason for leaving that info out in 3.x.

----------
assignee:  -> belopolsky
stage:  -> needs patch
versions: +Python 3.4

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

Reply via email to