Skip to content

Commit ac7494f

Browse files
author
Guido van Rossum
committed
Stop supporting isinstance().
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.
1 parent 108609f commit ac7494f

2 files changed

Lines changed: 71 additions & 330 deletions

File tree

0 commit comments

Comments
 (0)