Multi-isinstance idiom (Re: Deprecate tabs for indenting (was Re: Indenting with tabs vs spaces))
Greg Ewing
greg at cosc.canterbury.ac.nz
Thu Dec 6 18:24:43 EST 2001
"Mike C. Fletcher" wrote:
>
> That doesn't seem to keep the semantics, it only works if the tested
> class is an actual sub-class of your combination class
B****r, you're right! I withdraw the suggestion.
There was talk a while back of extending isinstance()
to take a tuple of classes as well as just a single
class. Something like that seems called for here.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list