Brett Cannon <br...@python.org> added the comment:

My thoughts on Alexander's questions:

1. Call it FixedTimezone or something (remember it has to be CapWords). Calling 
it simply Timezone does not convey the fact that DST is not supported and 
people might naively think it will. Its limited abilities should be portrayed 
in the name.

2. Keep the class dead-simple. The primary motivator is to support UTC, maybe 
the %z directive for strptime. Otherwise everything else should be left out of 
the stdlib and let third-parties manage it as they will be the ones that need 
to manage the bazillion timezone instances they need. We don't need to dictate 
an interface to them.

3. Taking a timedelta makes sense since the class represents the fixed time 
offset from UTC.

As for the tz_aware argument to utcnow and friends, I am fine with letting go 
of them if we have a utc attribute on datetime and we simply document that to 
get a UTC-aware value do ``now(datetime.utc)`` and consider deprecating utcnow.

----------

_______________________________________
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