kuroko-lang / kuroko

Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easy-to-embed bytecode compiler and interpreter.
https://kuroko-lang.github.io/
MIT License
427 stars 25 forks source link

Could time.*time() silently truncate floats into ints? #46

Closed kseistrup closed 6 months ago

kseistrup commented 6 months ago

Re: #43

Now that we have time.gmtime() and time.localtime(), could these methods silently truncate (well, preferrably round) the floaty output from time.time() into an int?

time.localtime(time.time())  # looks much cleaner than:
time.localtime(int(time.time()))

i.e., like Python.

kseistrup commented 6 months ago

Thanks for fixing this in f1d7bdaa5a85cbba913495deb8f22c29ef0bca3e :pray: