Fredrik Lundh wrote:
> Kay Schluehr wrote:
>
> > > if you manage to import the same thing multiple times, you'll
have
> > > multiple class objects representing the same source code, and is-
> > > instance won't work properly.
> >
> > Importing a class/module multiple times does not cause the proble
Kay Schluehr wrote:
> > if you manage to import the same thing multiple times, you'll have
> > multiple class objects representing the same source code, and is-
> > instance won't work properly.
>
> Importing a class/module multiple times does not cause the problem.
> Writing
>
> import ForeignP
Fredrik Lundh wrote:
> Kay Schluehr wrote:
>
> > I wonder why the isinstance() function is sensitive about the
import
> > path i.e. the result depends not only on the class and the instance
but
> > also on how a class is imported?
>
> isinstance uses class object identity.
>
> if you manage to impo
Kay Schluehr wrote:
> I wonder why the isinstance() function is sensitive about the import
> path i.e. the result depends not only on the class and the instance but
> also on how a class is imported?
isinstance uses class object identity.
if you manage to import the same thing multiple times, yo