On Mon, Mar 12, 2018 at 5:18 PM, Tim Peters <tim.peters at gmail.com> wrote: > [Guido] >> .... as_integer_ratio() seems mostly cute (it has Tim Peters all >> over it), > > Nope! I had nothing to do with it. I would have been -0.5 on adding > it had I been aware at the time. > > - I expect the audience is tiny. The datetime module would benefit from having as_integer_ratio() supported by more types. It's been hard to resist requests to allow Decimal in timedelta constructors and/or arithmetics >>> timedelta(Decimal('1.5')) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported type for timedelta days component: decimal.Decimal but >>> timedelta(1.5) datetime.timedelta(days=1, seconds=43200) I don't recall why we decided not to accept anything with an .as_integer_ratio() method. See <https://bugs.python.org/issue14262> for additional discussion.
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