Skip to content

Conversation

@nmlorg
Copy link

@nmlorg nmlorg commented Aug 1, 2019

In Python 2.6+, every entry in pytz.zone_tab is a named tuple with fields code, coordinates, zone, and comment, as in:

>>> [row for row in pytz.zone_tab if row.zone == 'America/Los_Angeles'][0].comment
'Pacific'

In all versions, pytz.zone_tab's entries are iterable as a set of values in that order:

>>> code, coordinates, zone, comment = pytz.zone_tab[399]
>>> zone, comment
(u'America/Los_Angeles', u'Pacific')

See https://bugs.launchpad.net/pytz/+bug/1324972 (and nmlorg/metabot#52).

In Python 2.6+, every entry in pytz.zone_tab is a named tuple with fields code, coordinates, zone, and comment, as in:

  >>> [row for row in pytz.zone_tab if row.zone == 'America/Los_Angeles'][0].comment
  'Pacific'

In all versions, pytz.zone_tab's entries are iterable as a set of values in that order:

  >>> code, coordinates, zone, comment = pytz.zone_tab[399]
  >>> zone, comment
  (u'America/Los_Angeles', u'Pacific')

See https://bugs.launchpad.net/pytz/+bug/1324972 (and nmlorg/metabot#52).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant