Re: find an object ancestor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Rebert

    Re: find an object ancestor

    On Sun, Nov 2, 2008 at 1:16 PM, Michel Perez <opsbat@infomed .sld.cuwrote:
    HI all:
    >
    imagine something like this:
    >
    class father:
    pass
    class son( father ):
    pass
    >
    I need to know the son ancestor class how can i know this.
    Help on built-in function issubclass in module __builtin__:

    issubclass(...)
    issubclass(C, B) -bool

    Return whether class C is a subclass (i.e., a derived class) of class B.
    When using a tuple as the second argument issubclass(X, (A, B, ...)),
    is a shortcut for issubclass(X, A) or issubclass(X, B) or ... (etc.).

    Cheers,
    Chris
    --
    Follow the path of the Iguana...

    >
    Thanks
    >
    >
    ---------------------------------------
    Red Telematica de Salud - Cuba
    CNICM - Infomed
    --

    >
Working...