class_docstr: A timezone that has a variable offset from UTC
  
  The offset might change if daylight saving time comes into effect,
  or at a point in history when the region decides to change their
  timezone definition.
class_docstr_tok: ["A","timezone","that","has","a","variable","offset","from","UTC","The","offset","might","change","if","daylight","saving","time","comes","into","effect",",","or","at","a","point","in","history","when","the","region","decides","to","change","their","timezone","definition","."]
docstr: See datetime.tzinfo.tzname
  
  The is_dst parameter may be used to remove ambiguity during DST
  transitions.
  
  >>> from pytz import timezone
  >>> tz = timezone('America/St_Johns')
  
  >>> normal = datetime(2009, 9, 1)
  
  >>> tz.tzname(normal)
  'NDT'
  >>> tz.tzname(normal, is_dst=False)
  'NDT'
  >>> tz.tzname(normal, is_dst=True)
  'NDT'
  
  >>> ambiguous = datetime(2009, 10, 31, 23, 30)
  
  >>> tz.tzname(ambiguous, is_dst=False)
  'NST'
  >>> tz.tzname(ambiguous, is_dst=True)
  'NDT'
  >>> try:
  ...     tz.tzname(ambiguous)
  ... except AmbiguousTimeError:
  ...     print('Ambiguous')
  Ambiguous
docstr_tok: ["See","datetime.tzinfo.tzname","The","is_dst","parameter","may","be","used","to","remove","ambiguity","during","DST","transitions",".",">",">",">","from","pytz","import","timezone",">",">",">","tz","=","timezone","(","'America\/St_Johns","'",")",">",">",">","normal","=","datetime","(","2009",",","9",",","1",")",">",">",">","tz.tzname","(","normal",")","'NDT'",">",">",">","tz.tzname","(","normal",",","is_dst=False",")","'NDT'",">",">",">","tz.tzname","(","normal",",","is_dst=True",")","'NDT'",">",">",">","ambiguous","=","datetime","(","2009",",","10",",","31",",","23",",","30",")",">",">",">","tz.tzname","(","ambiguous",",","is_dst=False",")","'NST'",">",">",">","tz.tzname","(","ambiguous",",","is_dst=True",")","'NDT'",">",">",">","try",":","...","tz.tzname","(","ambiguous",")","...","except","AmbiguousTimeError",":","...","print","(","'Ambiguous","'",")","Ambiguous"]
code: def tzname(self, dt, is_dst=None):
      """See datetime.tzinfo.tzname
  
      The is_dst parameter may be used to remove ambiguity during DST
      transitions.
  
      >>> from pytz import timezone
      >>> tz = timezone('America/St_Johns')
  
      >>> normal = datetime(2009, 9, 1)
  
      >>> tz.tzname(normal)
      'NDT'
      >>> tz.tzname(normal, is_dst=False)
      'NDT'
      >>> tz.tzname(normal, is_dst=True)
      'NDT'
  
      >>> ambiguous = datetime(2009, 10, 31, 23, 30)
  
      >>> tz.tzname(ambiguous, is_dst=False)
      'NST'
      >>> tz.tzname(ambiguous, is_dst=True)
      'NDT'
      >>> try:
      ...     tz.tzname(ambiguous)
      ... except AmbiguousTimeError:
      ...     print('Ambiguous')
      Ambiguous
      """
      if dt is None:
          return self.zone
      elif dt.tzinfo is not self:
          dt = self.localize(dt, is_dst)
          return dt.tzinfo._tzname
      else:
          return self._tzname
  
imports: from datetime import datetime, timedelta, tzinfo
  from bisect import bisect_right
  import pytz
  from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError
label_desc: Use image node_id 7 for calling the DstTzInfo obj's underlying member method code with example usage: obj.tzname(dt, is_dst) and returns: self, dt, self