Author pitrou
Recipients ajaksu2, belopolsky, brett.cannon, doerwalter, eric.araujo, ggenellina, kawai, pitrou, rafe, vstinner
Date 2010-05-25.09:45:19
SpamBayes Score 0.0383023
Marked as misclassified No
Message-id <1274780715.3174.7.camel@localhost.localdomain>
In-reply-to <AANLkTinuYn7pp2bVgqBl_AYJRzKeUsEOuhmTyNFgOEAb@mail.gmail.com>
Content
> 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
History
Date User Action Args
2010-05-25 09:45:23pitrousetrecipients: + pitrou, doerwalter, brett.cannon, belopolsky, ggenellina, vstinner, ajaksu2, kawai, eric.araujo, rafe
2010-05-25 09:45:20pitroulinkissue5094 messages
2010-05-25 09:45:19pitroucreate