[New-bugs-announce] [issue22627] Calling timestamp() on a datetime object modifies the timestamp of a different datetime object.

Christopher Lee report at bugs.python.org
Tue Oct 14 03:31:45 CEST 2014


New submission from Christopher Lee:

I have an example script here[1].
This script creates 2 datetime objects (using a timedelta work around to deal with large timestamps).
It then makes 2 assertions, that the timestamp of the created object is the same as the one that was used to create it. (when run with no arguments this script passes both assertions).
However, if the argument 'breakme' is passed to the script then after the first assertion the method 'timestamp()' is called on a different (un-asserted) datetime which will now make the 2nd assertion fail.

[1] http://paste.ubuntu.com/8556130/

----------
components: Library (Lib)
messages: 229276
nosy: thomir, veebers
priority: normal
severity: normal
status: open
title: Calling timestamp() on a datetime object modifies the timestamp of a different datetime object.
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22627>
_______________________________________


More information about the New-bugs-announce mailing list