MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / __init__

Method __init__

tests/test_code/py/pytz/tzinfo.py:179–191  ·  view source on GitHub ↗
(self, _inf=None, _tzinfos=None)

Source from the content-addressed store, hash-verified

177 _dst = None # DST offset
178
179 def __init__(self, _inf=None, _tzinfos=None):
180 if _inf:
181 self._tzinfos = _tzinfos
182 self._utcoffset, self._dst, self._tzname = _inf
183 else:
184 _tzinfos = {}
185 self._tzinfos = _tzinfos
186 self._utcoffset, self._dst, self._tzname = (
187 self._transition_info[0])
188 _tzinfos[self._transition_info[0]] = self
189 for inf in self._transition_info[1:]:
190 if inf not in _tzinfos:
191 _tzinfos[inf] = self.__class__(inf, _tzinfos)
192
193 def fromutc(self, dt):
194 '''See datetime.tzinfo.fromutc'''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected