Skip to content

Commit

Permalink
Change parameter xport in addr.PortList.__getitem__().
Browse files Browse the repository at this point in the history
  • Loading branch information
isislovecruft committed Dec 7, 2013
1 parent 52b1a4c commit d353412
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/bridgedb/parse/addr.py
Expand Up @@ -361,12 +361,12 @@ def __len__(self):
"""Returns the total number of ports in this PortList."""
return len(self.ports)

def __getitem__(self, x):
"""Get a port if it is in this PortList.
def __getitem__(self, port):
"""Get the value of ``port`` if it is in this PortList.
:raises: ValueError if ``x`` isn't in this PortList.
:raises: ValueError, if ``port`` isn't in this PortList.
:rtype: integer
:returns: The port ``x``, if it is in this PortList.
:returns: The ``port``, if it is in this PortList.
"""
portlist = list(self.ports)
return portlist[portlist.index(x)]
return portlist[portlist.index(port)]

0 comments on commit d353412

Please sign in to comment.