Skip to content

Commit

Permalink
Stop supporting isinstance().
Browse files Browse the repository at this point in the history
The big exception is isinstance(f, Callable), which is now equivalent
to isinstance(f, collections.abc.Callable).  Also other enhanced ABCs
that shadow ABCs from collections.abc still support isinstance() --
but not the concrete classes (List, Dict, Set, FrozenSet).

I'm sad to see the original Callable.__instancecheck__ go, but Mark
Shannon's right that isinstance() with a type argument is just poorly
defined.

Fixes #135.
  • Loading branch information
Guido van Rossum committed Jun 4, 2015
1 parent 108609f commit ac7494f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 330 deletions.
Loading

0 comments on commit ac7494f

Please sign in to comment.