On 07/05/10 22:23, Adam Bark wrote: > > I should add that this is how something like: > > if x != y: > do_something() > > works, if expects a True or False (this isn't always true but works for > comparison operators expressions such as this). >
<nit> "if" expects an expression that can be converted to True or False by calling its __bool__()/__nonzero__(); in case of missing __bool__/__nonzero__, then the object is considered True. </nit> _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor