D5014: py3: use %d in a few places

Yuya Nishihara yuya at tcha.org
Sat Oct 13 04:12:21 UTC 2018


> -            time = str(sample.time)
> +            time = sample.time
>              stack = sample.stack
>              sites = ['\1'.join([s.path, str(s.lineno), s.function])
>                       for s in stack]
> -            file.write("%s\0%s\n" % (time, '\0'.join(sites)))
> +            file.write("%d\0%s\n" % (time, '\0'.join(sites)))

I guess `time` is a floating-point value. `b"%r"` can be used in which case.



More information about the Mercurial-devel mailing list