[Python-ideas] datetime: Support infinity

Ethan Furman ethan at stoneleaf.us
Thu Jan 29 20:36:17 CET 2015


On 01/29/2015 11:29 AM, random832 at fastmail.us wrote:
> On Thu, Jan 29, 2015, at 14:19, Yawar Amin wrote:
>> Hi Chris, sorry for the top-posting; replying from my phone.
>>
>> My test implementation works for me on Python 2.7, see http://repl.it/9Wz
>>
>> Notice especially the last few assertions, where normal datetime objects
>> are on the LHS.
> 
> How'd you do that? Does python always know to use the derived class's
> operators when working with a base class and a derived class?

I can't find the reference, but yes.

So the broken datetime behavior would only be noticed by a non-datetime derived class.

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150129/73cabb97/attachment.sig>


More information about the Python-ideas mailing list