Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

On Mon, May 24, 2010 at 11:06 PM, Rafe Kaplan <rep...@bugs.python.org> wrote:
..
> I had originally thought of doing the class, and then having constants 
> associated with it:
>
>  UTC.UTC0
>
> Eventually if we support multiple timezones:
>
>  UTC.UTC1
..
>
> Well... maybe not given how impossible the naming would be.
..

I actually like your original idea.  It seems wasteful to create a
concrete timezone class in a C module and only use it for a single
timezone.  FixedOffset class in tzinfo-examples.py is only slightly
more complicated than UTC class and as explained in the comment above
it, "FixedOffset(0, "UTC") is a different way to build a UTC tzinfo
object.  FixedOffset objects can then be used to produce aware
datetime instances from strptime.  (See issue6641.)  I would only
define utc = FixedOffset(0, "UTC") instance and make name argument to
FixedOffset optional defaulting to UTC(+/-)hhmm.

----------

_______________________________________
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

Reply via email to