• Guido van Rossum's avatar
    Patch by Jim Fulton (code style tweaked a bit) to support · 668213d3
    Guido van Rossum authored
    ExtensionClasses in isinstance() and issubclass().
    
      - abstract instance and class protocols are used *only* in those
        cases that would generate errors before the patch.  That is, there's
        no penalty for the normal case.
    
      - instance protocol: an object smells like an instance if it
        has a __class__ attribute that smells like a class.
    
      - class protocol: an object smells like a class if it has a
        __bases__ attribute that is a tuple with elements that
        smell like classes (although not all elements may actually get
        sniffed ;).
    668213d3
bltinmodule.c 58.1 KB