def unpickler(zone, utcoffset=None, dstoffset=None, tzname=None):
 tz = pytz.timezone(zone)
 if (utcoffset is None):
  return tz
 utcoffset = memorized_timedelta(utcoffset)
 dstoffset = memorized_timedelta(dstoffset)
 try:
  return tz._tzinfos[(utcoffset, dstoffset, tzname)]
 except KeyError:
  pass
 for localized_tz in tz._tzinfos.values():
  if ((localized_tz._utcoffset == utcoffset) and (localized_tz._dst == dstoffset)):
   return localized_tz
 inf = (utcoffset, dstoffset, tzname)
 tz._tzinfos[inf] = tz.__class__(inf, tz._tzinfos)
 return tz._tzinfos[inf]

def unpickler ( zone , utcoffset = None , dstoffset = None , tzname = None ) : tz = pytz . timezone ( zone ) if ( utcoffset is None ) : return tz utcoffset = memorized_timedelta ( utcoffset ) dstoffset = memorized_timedelta ( dstoffset ) try : return tz . _tzinfos [ ( utcoffset , dstoffset , tzname ) ] except KeyError : pass for localized_tz in tz . _tzinfos . values ( ) : if ( ( localized_tz . _utcoffset == utcoffset ) and ( localized_tz . _dst == dstoffset ) ) : return localized_tz inf = ( utcoffset , dstoffset , tzname ) tz . _tzinfos [ inf ] = tz . __class__ ( inf , tz . _tzinfos ) return tz . _tzinfos [ inf ]
factory function for unpickling pytz tzinfo instances .