On Sat, Dec 29, 2012 at 2:23 AM, Steven D'Aprano <steve at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20121229/eff5ef10/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4