On 15 June 2013 21:41, Dave Angel <da...@davea.name> wrote:

>>>> class NobodyHome:
> ...     def __bool__(self):
> ...         return False  #normally, you'd be testing some attribute to
> decide this
>
> ...
>>>> x = NobodyHome()
>>>> not x
> True
>
That's a breath of fresh air - talk about freedom ;')  Makes me eager
to get to classes so I can redefine sets as tagged sets.

-- 
Jim
After indictment the bacon smuggler was put on the no-fry list
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to