def __init__(self, name_or_email, email=None, encoding='utf-8'):
		self.encoding = encoding

		if email is None:
			if isinstance(name_or_email, AddressList):
				if not 0 < len(name_or_email) < 2:
					raise ValueError("AddressList to convert must only contain a single Address.")

				name_or_email = unicode(name_or_email[0])

			if isinstance(name_or_email, (tuple, list)):
				self.name = unicodestr(name_or_email[0], encoding)
				self.address = unicodestr(name_or_email[1], encoding)

			elif isinstance(name_or_email, bytes):
				self.name, self.address = parseaddr(unicodestr(name_or_email, encoding))

			elif isinstance(name_or_email, unicode):
				self.name, self.address = parseaddr(name_or_email)

			else:
				raise TypeError('Expected string, tuple or list, got {0} instead'.format(
						repr(type(name_or_email))
					))
		else:
			self.name = unicodestr(name_or_email, encoding)
			self.address = unicodestr(email, encoding)

		email, err = EmailValidator().validate_email(self.address)

		if err:
			raise ValueError('"{0}" is not a valid e-mail address: {1}'.format(email, err))
dataset/ETHPy150Open marrow/mailer/marrow/mailer/address.py/Address.__init__/original