Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
bpo-35707: support __index__ and __float__ in time functions #11636
Note that there is substantial code duplication in my patch, but that is only because the existing code already had substantial duplication. It would be possible to fix that, at the expense of a slightly more complicated (and therefore probably slightly slower) implementation.