On Sat, Dec 29, 2012 at 2:23 AM, Steven D'Aprano <st...@pearwood.info>wrote:
> The PEP says: > > * New function :``timezone(name=None, db_path=None)`` > > > This function takes a name string that must be a string specifying a > valid zoneinfo timezone, ie "US/Eastern", "Europe/Warsaw" or > "Etc/GMT+11". > > > It isn't 100% clear to me from the PEP what a valid name string would be, > but I assume that it will accept anything that the time.tzset function > will accept: > No, valid names are the names of time zones in the zoneinfo database. There isn't really any usecase for defining up your own rules as that would mean that you want a time zone that doesn't exist, which seems a bit pointless. :-) (We have KeyError rather than UnknownKeyError, NameError rather than > UnknownNameError, etc.) > Sure, but what would otherwise a KeyError be unless an unkown or non-existing key? //Lennart
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com