From d35341233505c557ceeb5d0e30d27787c138924b Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Sat, 7 Dec 2013 04:45:39 +0000 Subject: [PATCH] =?UTF-8?q?Change=20parameter=20`x`=20=E2=86=92=20`port`?= =?UTF-8?q?=20in=20addr.PortList.=5F=5Fgetitem=5F=5F().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bridgedb/parse/addr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bridgedb/parse/addr.py b/lib/bridgedb/parse/addr.py index 0c509340..7347bd1f 100644 --- a/lib/bridgedb/parse/addr.py +++ b/lib/bridgedb/parse/addr.py @@ -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)]