[Python-Dev] Draft PEP for time zone support. (original) (raw)
Terry Reedy tjreedy at udel.edu
Fri Dec 28 21:45:37 CET 2012
- Previous message: [Python-Dev] Draft PEP for time zone support.
- Next message: [Python-Dev] Draft PEP for time zone support.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/28/2012 1:02 PM, Lennart Regebro wrote:
On Thu, Dec 20, 2012 at 5:43 PM, Barry Warsaw <barry at python.org_ _<mailto:barry at python.org>> wrote:
That would be
class UnknownTimeZoneError(ValueError, TimeZoneError)
. As of today, in Pytz, UnknownTimeZoneError in fact subclasses KeyError. Any opinions against that?
Since the erroneous value is used as a key for a database lookup, and the error is probably detected by trying the lookup, I think that is ok. even if the user does not use []s.
There is no TimeZoneError today, and it would only be used for this UnknownTimeZoneError, so I'm not sure it has much value.
-- Terry Jan Reedy
- Previous message: [Python-Dev] Draft PEP for time zone support.
- Next message: [Python-Dev] Draft PEP for time zone support.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]