◐ Shell
clean mode source ↗

Message 106445 - Python tracker

On Tue, May 25, 2010 at 5:45 AM, Antoine Pitrou <report@bugs.python.org> wrote:
..
> I also agree with Brett that a singleton looks rather unnecessary (it
> also look quite C++/Java-esque to me).
>

I still don't understand your aversion to singletons and you did not
address any of the advantages that I listed in my previous comment.  I
don't think singletons are foreign to Python: after all we write None
rather than NoneType() .

We can reach a middle ground by interning UTC instances behind the
scenes so that UTC() is UTC() will always be true.  This will address
most of the issues that I raised and utc = datetime.UTC() is simple
enough to write as long as you don't have to worry about sharing utc
instance between modules.