Why would I use inspect.isclass()?
Steve Holden
steve at holdenweb.com
Thu Dec 30 08:37:38 EST 2004
it's me wrote:
> Okay, Nick, I didn't know you can pass a "Class" rather then an instance. I
> have to chew on what your example does.
>
> But no, I want to pass an instance of a Class. But how do I know that the
> calling routine *did* pass me a class - pardon me: an instance of a Class?
>
You should Google for "duck typing" and stop worrying so much about what
your functions//methods have been passed.
At least, that's the traditional Python approach. I suspect you are
still trying to program in C in Python :-)
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
More information about the Python-list
mailing list