commit 9494506655a027e5c8daca475daad2acf4c0ae2b Author: Isis Lovecruft isis@torproject.org Date: Sat Dec 7 04:45:39 2013 +0000
Change parameter `x` → `port` in addr.PortList.__getitem__(). --- 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 0c50934..7347bd1 100644 --- a/lib/bridgedb/parse/addr.py +++ b/lib/bridgedb/parse/addr.py @@ -361,12 +361,12 @@ class PortList(object): """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)]