Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> class Cris(object):
- ... favorites = ['python', 'zope', 'plone', 'django', 'pyramid']
- ... def __lt__(self, other):
- ... if other == 3:
- ... import random
- ... print random.choice(self.favorites)
- ...
- >>> cris = Cris()
- >>> cris <3
- zope
- >>> cris <3
- django
- >>> cris <3
- python
- >>>
Add Comment
Please, Sign In to add comment