Message106422
> 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 |
|
Date |
User |
Action |
Args |
2010-05-25 09:45:23 | pitrou | set | recipients:
+ pitrou, doerwalter, brett.cannon, belopolsky, ggenellina, vstinner, ajaksu2, kawai, eric.araujo, rafe |
2010-05-25 09:45:20 | pitrou | link | issue5094 messages |
2010-05-25 09:45:19 | pitrou | create | |
|