How about a less confusing repr?

„WTF, why is this a string?”
legacy
Nils Martin Klünder 2015-02-21 19:17:49 +01:00
parent 45d920850e
commit 71c2417b9d
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Node():
self.interfaces[mac] = Interface() self.interfaces[mac] = Interface()
def __repr__(self): def __repr__(self):
return self.macs.__repr__() return '<Node %s>' % self.macs.__repr__()
class Interface(): class Interface():
def __init__(self): def __init__(self):