This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pythoner
Recipients pythoner
Date 2014-10-05.08:38:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412498326.6.0.319786420507.issue22556@psf.upfronthosting.co.za>
In-reply-to
Content
code snippet
student_tuple = [ ('ykjsdf', 'A', 17, datetime.date(2014,10,15)), ('accjr', 'C', 11, datetime.date(2013,05,05)), ('dgekw', 'B', 5, datetime.date(1987,03,03)) ]

Output for the above code works as expected.
o/p : [('dgekw', 'B', 5, datetime.date(1987, 3, 3)), ('accjr', 'C', 11, datetime.date(2013, 5, 5)), ('ykjsdf', 'A', 17, datetime.date(2014, 10, 15))]

but when you make one of the above datetime.date as 'None' like below

student_tuple = [ ('ykjsdf', 'A', 17, datetime.date(2014,10,15)), ('accjr', 'C', 11, None), ('dgekw', 'B', 5, datetime.date(1987,03,03)) ]
 
o/p : TypeError: can't compare datetime.date to NoneType

In my opinion, the 'NoneType' should appear either in the beginning or towards the end after sorting is done.
History
Date User Action Args
2014-10-05 08:38:46pythonersetrecipients: + pythoner
2014-10-05 08:38:46pythonersetmessageid: <1412498326.6.0.319786420507.issue22556@psf.upfronthosting.co.za>
2014-10-05 08:38:46pythonerlinkissue22556 messages
2014-10-05 08:38:46pythonercreate