parameters: (self)
return_statement: return EMPTYSTRING.join(aslist) + self.getdomain()
docstring: Parse an RFC 2822 addr-spec.
docstring_summary: Parse an RFC 2822 addr-spec.
docstring_tokens: Parse an RFC 2822 addr - spec .
function: def getaddrspec(self):
          """Parse an RFC 2822 addr-spec."""
          aslist = []
  
          self.gotonext()
          while self.pos < len(self.field):
              if self.field[self.pos] == '.':
                  aslist.append('.')
                  self.pos += 1
              elif self.field[self.pos] == '"':
                  aslist.append('"%s"' % quote(self.getquote()))
              elif self.field[self.pos] in self.atomends:
                  break
              else:
                  aslist.append(self.getatom())
              self.gotonext()
  
          if self.pos >= len(self.field) or self.field[self.pos] != '@':
              return EMPTYSTRING.join(aslist)
  
          aslist.append('@')
          self.pos += 1
          self.gotonext()
          return EMPTYSTRING.join(aslist) + self.getdomain()
function_tokens: def getaddrspec ( self ) : aslist = [ ] self . gotonext ( ) while self . pos < len ( self . field ) : if self . field [ self . pos ] == '.' : aslist . append ( '.' ) self . pos += 1 elif self . field [ self . pos ] == '"' : aslist . append ( '"%s"' % quote ( self . getquote ( ) ) ) elif self . field [ self . pos ] in self . atomends : break else : aslist . append ( self . getatom ( ) ) self . gotonext ( ) if self . pos >= len ( self . field ) or self . field [ self . pos ] != '@' : return EMPTYSTRING . join ( aslist ) aslist . append ( '@' ) self . pos += 1 self . gotonext ( ) return EMPTYSTRING . join ( aslist ) + self . getdomain ( )