Talin <[EMAIL PROTECTED]> writes: > How about instead of 'callable', an "isFunction' test to go along > with 'isSequence' and 'isMapping'. (You aren't getting rid of those - > I hope...?)
Such predicates, unless backed by some explicit or strict criterion like isinstance, are as suspicious for me as checking function arity. They don't survive generic wrappers. What would isFunction exactly mean? IMHO duck typing makes sense only if it's not used to discriminate what interfaces the given object supports, but only to provide an already expected interface. In order to declare that an interface is supported and to be able to recognize it, subtyping is better. Unfortunately it must be decided early that the given interface should be discoverable by subtyping. -- __("< Marcin Kowalczyk \__/ [EMAIL PROTECTED] ^^ http://qrnik.knm.org.pl/~qrczak/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com