[Python-3000] multi-dispatch again

Bill Janssen janssen at parc.com
Wed Jan 17 00:28:46 CET 2007


Of course, the purpose of using ABCs is to allow easy inspection of
the capabilities of an object, and for some objects, the state can be
an important part.  But don't be misled to confuse ABCs with simply
type-based function dispatch.  They're useful for other things as
well.

I think that stateful value types should probably have, as you say,
mechanisms for inspecting that state.  For instance, the current
"file" type has a "closed" attribute, doesn't it?

Bill


More information about the Python-3000 mailing list