[Python-Dev] bpo-36558: Change time.mktime() return type from float to int?
Guido van Rossum
guido at python.org
Tue Apr 16 11:46:31 EDT 2019
On Tue, Apr 16, 2019 at 8:19 AM Victor Stinner <vstinner at redhat.com> wrote:
> Le mar. 16 avr. 2019 à 16:44, Paul Ganssle <paul at ganssle.io> a écrit :
> > 2. Mainly for Victor, but anyone can answer: I agree that the natural
> output of `mktime()` would be `int` if I were designing it today, but would
> there be any practical benefits for making this change?
> It's just for the consistency of the function regarding to C function
> mktime() return type and its input types :-)
But all Python times are reported or accept floats -- this allows
sub-second precision without using complicated data structures. None of the
C functions use floats. Consistency with C should not be the issue --
consistency between the time functions is important.
> > Are there problems cropping up because it's returning a float?
So let's drop the idea.
> Night gathers, and now my watch begins. It shall not end until my death.
> Python-Dev mailing list
> Python-Dev at python.org
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev