-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
John O'Hagan
Sent: Saturday, August 27, 2011 11:00 PM
To: [email protected]
Subject: Get reference to parent class from subclass?
class P():
pass
class C(P):
pass
Can I get P from C?
IOW, can I get a reference to the object P from the object C? This should be
obvious one way or the other, but I haven't been able to find the answer.
Regards,
John
--
You should be able to access what you need via the super() built-in. I am not
entirely sure what you are trying to do...but I think usage of super is
probably better than trying to access the base classes manually.
Ramit
Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
--
http://mail.python.org/mailman/listinfo/python-list