Mercurial > public > src > moin > 1.9
diff MoinMoin/user.py @ 339:083c2d82a173
add User.__repr__
imported from: moin--main--1.5--patch-343
author | Thomas Waldmann <tw@waldmann-edv.de> |
---|---|
date | Tue, 20 Dec 2005 21:48:52 +0000 |
parents | 1fb19804a4b9 |
children | fb5e1ecdbc33 |
line wrap: on
line diff
--- a/MoinMoin/user.py Tue Dec 20 21:43:32 2005 +0000 +++ b/MoinMoin/user.py Tue Dec 20 21:48:52 2005 +0000 @@ -286,6 +286,11 @@ if self.language and not languages.has_key(self.language): self.language = 'en' + def __repr__(self): + return "<%s.%s at 0x%x name:%r id:%s valid:%r>" % ( + self.__class__.__module__, self.__class__.__name__, + id(self), self.name, self.id, self.valid) + def make_id(self): """ make a new unique user id """ #!!! this should probably be a hash of REMOTE_ADDR, HTTP_USER_AGENT