@property
    def port(self):
        netloc = self.netloc.split('@', 1)[-1]
        if netloc.startswith('['):
            netloc = netloc.rsplit(']')[1]
        if ':' in netloc:
            return int(netloc.rsplit(':')[1])
        return None
dataset/ETHPy150Open openstack/swift/swift/common/utils.py/ModifiedParseResult.port/original