A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-March/013470.html below:

Adding a Rational Type to Python

[Python-Dev] Re: Adding a Rational Type to Python [Python-Dev] Re: Adding a Rational Type to PythonGuido van Rossum guido@digicool.com
Mon, 12 Mar 2001 09:57:31 -0500
> > Question: the time module's time() function currently returns a
> > float.  Should it return a rational instead?  This is a trick question.
> 
> It should return the most exact number the underlying operating system
> supports. For example, in OSes supporting gettimeofday, return a rational
> built from tv_sec and tv_usec.

I told you it was a trick question. :-)

Time may be *reported* in microseconds, but it's rarely *accurate* to
microseconds.  Because the precision is unclear, I think a float is
more appropriate here.

--Guido van Rossum (home page: http://www.python.org/~guido/)




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4