Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12399

Re: Get reference to parent class from subclass?

Date 2011-08-28 18:18 +1000
From johnohagan <mail@johnohagan.com>
Subject Re: Get reference to parent class from subclass?
References <20110828140024.f945cf73052f0c39b0a22a99@johnohagan.com>
Newsgroups comp.lang.python
Message-ID <mailman.543.1314615864.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, 28 Aug 2011 14:00:24 +1000
John O'Hagan <research@johnohagan.com> wrote:

> class P():
>     pass
> 
> class C(P):
>     pass
> 
> Can I get P from C? 
> 

Never mind, it's __bases__ (not found in dir(C))

> 
> Regards,
> 
> John

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Get reference to parent class from subclass? johnohagan <mail@johnohagan.com> - 2011-08-28 18:18 +1000

csiph-web