3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-03-28 10:31:01 +01:00

Irc: more compact __repr__ for IrcChannel/IrcServer/IrcUser

This commit is contained in:
James Lu 2017-03-11 22:49:48 -08:00
parent 716ac681b6
commit afc5cc26fa

View File

@ -1240,7 +1240,7 @@ class IrcUser():
self.manipulatable = manipulatable self.manipulatable = manipulatable
def __repr__(self): def __repr__(self):
return 'IrcUser(%s)' % self.__dict__ return 'IrcUser(%s/%s)' % (self.uid, self.nick)
class IrcServer(): class IrcServer():
"""PyLink IRC server class. """PyLink IRC server class.
@ -1259,7 +1259,7 @@ class IrcServer():
self.desc = desc self.desc = desc
def __repr__(self): def __repr__(self):
return 'IrcServer(%s)' % self.__dict__ return 'IrcServer(%s)' % self.name
class IrcChannel(): class IrcChannel():
"""PyLink IRC channel class.""" """PyLink IRC channel class."""
@ -1280,7 +1280,7 @@ class IrcChannel():
self.name = name self.name = name
def __repr__(self): def __repr__(self):
return 'IrcChannel(%s)' % self.__dict__ return 'IrcChannel(%s)' % self.name
def removeuser(self, target): def removeuser(self, target):
"""Removes a user from a channel.""" """Removes a user from a channel."""