changeset 234:f2c07caca7bc

created
author 127.0.0.1
date Sun, 30 Jun 2013 10:16:07 +0200
parents 48c47b5967ed
children 4aa2a8a97161
files bool%28%29
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bool%28%29	Sun Jun 30 10:15:22 2013 +0200
+++ b/bool%28%29	Sun Jun 30 10:16:07 2013 +0200
@@ -1,6 +1,6 @@
 {{{#!python
 def bool(thing):
-    if hasattr(thing, '__nonzero__'):
+    if hasattr(thing.__class__, '__nonzero__'):
         return thing.__nonzero__()
     return len(thing) != 0
 }}}
\ No newline at end of file