4 Apr
2010
4 Apr
'10
4:35 a.m.
Bruce Leban wrote:
foo is in bar = hasattr(foo,bar) foo is not in bar = not hasattr(foo,bar) foo is class bar = isinstance(foo,bar) foo is from bar = issubclass(foo,bar) foo is with bar = type(foo) == type(bar)
+1. Also we must absolutely have foo is totally bar for those *$&@*&(*@& moments we all experience while coding. -- Greg