Antoine Pitrou <pit...@free.fr> added the comment: > Note that I am not suggesting passing anything to utcnow(). I would > either leave it unchanged or make it always return aware datetime > instances.
The latter would break compatibility, though (especially given how comparison between "naive" and "aware" datetimes raises an error...). I also agree with Brett that a singleton looks rather unnecessary (it also look quite C++/Java-esque to me). On the subject of the patch: - Alexander spotted the PyObject_IsTrue() issue - you should never use tabs (anymore), only 4 spaces - lines like: self.assertTrue(isinstance(now.tzinfo, UTC)) can be rewritten as self.assertIsInstance(now.tzinfo, UTC) - here, I'm not sure why you're using "UTC" as the error message (copy/paste error?): self.assertEquals(None, meth(False).tzinfo, UTC) - you might make the UTC class subclassable, although I'm not sure there's any point ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5094> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com