Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64643
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: datetime as subclass of date |
| Date | 2014-01-23 19:10 -0500 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-29B820.19102323012014@news.panix.com> (permalink) |
| References | <CANc-5Uw5z84=vAMVJaCH-KCSR=1q8_zTKuspaF2zzOG9qtVu4Q@mail.gmail.com> <mailman.5913.1390515296.18130.python-list@python.org> |
In article <mailman.5913.1390515296.18130.python-list@python.org>, Ben Finney <ben+python@benfinney.id.au> wrote: > Skip Montanaro <skip@pobox.com> writes: > > > […] I was asking [Python] if a datetime instance was an instance of a > > date. Which, it turns out, it is. > > Yep. Makes sense, since ‘datetime’ can do everything ‘date’ can do, and > is conceptually a subset of the same concept. That's reasonable, but given that, it's weird that date(2014, 1, 23) == datetime(2014, 1, 23) is False. You would think it should be True, in the same way that 1 + 0j == 1 is True.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: datetime as subclass of date Ben Finney <ben+python@benfinney.id.au> - 2014-01-24 09:14 +1100
Re: datetime as subclass of date Roy Smith <roy@panix.com> - 2014-01-23 19:10 -0500
Re: datetime as subclass of date Ben Finney <ben+python@benfinney.id.au> - 2014-01-24 17:54 +1100
Re: datetime as subclass of date Skip Montanaro <skip@pobox.com> - 2014-01-24 10:03 -0600
csiph-web