code: def getport(self, default=None):
          
          port = self.port
          if port:
              return int(port)
          else:
              return default
docs: Return the port subcomponent of the URI authority as an
          :class:`int`, or `default` if the original URI reference did
          not contain a port or if the port was empty.