[issue28878] datetime should not be a subclass of date

2016-12-05 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue28878] datetime should not be a subclass of date

2016-12-05 Thread R. David Murray
R. David Murray added the comment: Hmm. I thought there was a PEP, but maybe datetime was from before PEPs because I did find a PEP when I searched. I don't have specific pointers to discussion, that's why I suggested you search first. I'm pretty sure I remember a discussion of this some ti

[issue28878] datetime should not be a subclass of date

2016-12-05 Thread sergem
sergem added the comment: Would you be so kind to point to me to the discussion/arguments for that choice? Also http://www.gossamer-threads.com/lists/python/python/1114426 -- resolution: not a bug -> ___ Python tracker

[issue28878] datetime should not be a subclass of date

2016-12-05 Thread R. David Murray
R. David Murray added the comment: Right or wrong, this was a concious design choice. If you wish to argue that it should be changed, you need to address it on the python-ideas mailing list (but look for previous threads about it there and on python-dev first). -- nosy: +r.david.murra

[issue28878] datetime should not be a subclass of date

2016-12-05 Thread sergem
New submission from sergem: I have Python 3.5.2. datetime is implemented as a subclass of date (isinstance(datetime.datetime(2015,1,1), datetime.date) == True) I suppose that violates Liskov substitution principle: 1. datetime and date cannot be compared via "<". 2. both of these classes have