Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'completeness': 0.05; 'subject:reference': 0.09; 'message-----': 0.12; '712': 0.16; 'currencies': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'privilege,': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:169.70': 0.16; 'received:169.70.184': 0.16; 'received:169.70.190': 0.16; 'received:172.18.0': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; "haven't": 0.20; 'trying': 0.21; 'header:In-Reply-To:1': 0.22; 'received:169.254.1': 0.23; 'to:name:python-list@python.org': 0.23; 'classes': 0.28; 'pass': 0.29; '27,': 0.29; 'parent': 0.30; 'received:155': 0.30; 'received:159': 0.30; 'class': 0.30; 'subject:?': 0.31; 'subject:': 0.32; 'probably': 0.33; 'to:addr :python-list': 0.33; 'sent:': 0.33; 'received:169': 0.34; 'received:169.254': 0.34; 'received:172.18': 0.34; 'phone:': 0.35; 'reference': 0.35; 'object': 0.35; 'charset:us-ascii': 0.36; 'header:Received:8': 0.36; 'accuracy': 0.37; 'skip:p 50': 0.37; 'but': 0.37; 'think': 0.38; 'from:': 0.38; 'should': 0.38; 'subject:: ': 0.39; 'skip:- 10': 0.39; 'to:addr:python.org': 0.39; 'subject:from': 0.40; 'subject': 0.61; 'john': 0.62; 'super': 0.64; 'information,': 0.65; 'legal': 0.70; 'august': 0.70; 'subject:Get': 0.71; 'url:email': 0.74; 'sale': 0.75; 'bank': 0.76; 'investment': 0.77; 'purchase': 0.84; 'subject:class': 0.84 X-DKIM: Sendmail DKIM Filter v2.5.6 sz2.jpmchase.com p7ULQYJC017839 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmorgan.com; s=smtpout; t=1314739594; bh=dwzBpUC7kDV72LROjy0sdRDf2u21bNdb0eGXfk+ x5dY=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=czvKA5ju7g7 pkDm9luXswtMLo3NtHMwBaNKVj+lpIssVgrrAUcoz+nG2yz4ojev3MRHr4uuyYyeFpf 7bZoTYx+raZf2a+TD7y0lOgwIydi1wo9PAYFh0bNIzZxJxiVjMC6IpCdnQUDDokgTxu JHrW0sRXk3LUCH1AripQclyRUQ= From: "Prasad, Ramit" To: "python-list@python.org" Date: Tue, 30 Aug 2011 17:26:24 -0400 Subject: RE: Get reference to parent class from subclass? Thread-Topic: Get reference to parent class from subclass? Thread-Index: AcxmO3MIvqVLklbKSPOTbkeKqEIFCwBH6v0Q References: <20110828140024.f945cf73052f0c39b0a22a99@johnohagan.com> In-Reply-To: <20110828140024.f945cf73052f0c39b0a22a99@johnohagan.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314739602 news.xs4all.nl 2531 [2001:888:2000:d::a6]:47428 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12451 -----Original Message-----=0D=0AFrom: python-list-bounces+ramit=2Eprasad=3D= jpmorgan=2Ecom@python=2Eorg [mailto:python-list-bounces+ramit=2Eprasad=3Djp= morgan=2Ecom@python=2Eorg] On Behalf Of John O'Hagan=0D=0ASent: Saturday, A= ugust 27, 2011 11:00 PM=0D=0ATo: python-list@python=2Eorg=0D=0ASubject: Get= reference to parent class from subclass?=0D=0A=0D=0Aclass P():=0D=0A pa= ss=0D=0A=0D=0Aclass C(P):=0D=0A pass=0D=0A=0D=0ACan I get P from C? =0D= =0A=0D=0AIOW, 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 th= e answer=2E=0D=0A=0D=0ARegards,=0D=0A=0D=0AJohn=0D=0A-- =0D=0A=0D=0A=0D=0AY= ou should be able to access what you need via the super() built-in=2E I am = not entirely sure what you are trying to do=2E=2E=2Ebut I think usage of su= per is probably better than trying to access the base classes manually=2E= =0D=0A=0D=0ARamit=0D=0A=0D=0A=0D=0ARamit Prasad | JPMorgan Chase Investment= Bank | Currencies Technology=0D=0A712 Main Street | Houston, TX 77002=0D= =0Awork phone: 713 - 216 - 5423=0D=0A=0D=0A=0D=0A=0D=0AThis email is confid= ential and subject to important disclaimers and=0D=0Aconditions including o= n offers for the purchase or sale of=0D=0Asecurities, accuracy and complete= ness of information, viruses,=0D=0Aconfidentiality, legal privilege, and le= gal entity disclaimers,=0D=0Aavailable at http://www=2Ejpmorgan=2Ecom/pages= /disclosures/email=2E