Base-class method access
Joseph Barillari
jbarilla at princeton.edu
Mon Jul 15 22:25:46 EDT 2002
Hi.
Is it possible for a derived class to access overridden methods of its
base class? For example:
class Foo:
def frob():
print "Spam"
class Bar(Foo):
def frob():
print "Eggs"
# In C#, the syntax to call Foo's frob() would be
# base.frob()
<Insert Python-appropriate syntax for that call here>
>> a = Bar()
>> a.frob()
Eggs
Spam
Is there a means of doing this in Python?
Thanks in advance.
--Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 265 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20020715/3c744aa8/attachment.sig>
More information about the Python-list
mailing list