On Mon, 27 Aug 2007, Kent Johnson wrote: > isinstance can take a tuple of types as its second argument.... > > Note that > isinstance(thing, (list, tuple)) > > and > type(thing) in [list, tuple] > > are not equivalent. The first will be true for objects whose type is a > subclass of list and tuple while the second will not.
Thanks. I totally missed that isinstance's second parameter can be a tuple. That's a much better approach. Wow, that makes two things I've learned today. My brain is now full. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
