[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

Victor Stinner victor.stinner at gmail.com
Thu Feb 16 23:48:42 CET 2012


2012/2/16 Guido van Rossum <guido at python.org>:
> On Thu, Feb 16, 2012 at 2:04 PM, Victor Stinner
> <victor.stinner at gmail.com> wrote:
>> It doesn't change anything to the Makefile issue, if timestamps are
>> different in a single nanosecond, they are seen as different by make
>> (by another program comparing the timestamp of two files using
>> nanosecond precision).
>
> But make doesn't compare timestamps for equality -- it compares for
> newer. That shouldn't be so critical, since if there is an *actual*
> causal link between file A and B, the difference in timestamps should
> always be much larger than 100 ns.

The problem is that shutil.copy2() produces sometimes *older*
timestamp :-/ As shown in my previous email: in such case, make will
always rebuild the second file instead of only build it once.

Example with two consecutive runs:

$ ./python diff.py
1329432426.650957952
1329432426.650958061
1.09E-7

$ ./python diff.py
1329432427.854957910
1329432427.854957819
-9.1E-8

Victor


More information about the Python-Dev mailing list