super - is (should) it (be) a reserved word?

Michal Wallace sabren at manifestation.com
Sat Oct 7 02:18:29 EDT 2000


On Sat, 7 Oct 2000, Thomas Gagne wrote:


> I like the idea of 'super' being useful when there's single
> inheritence, and its behavior being undefined, or even an error,
> when thee are multiples.

how about a utility function?

def super(object):
   try:
       return object.__class__.__bases__[0]
   else:
       return None


Cheers,

- Michal
------------------------------------------------------------------------
www.manifestation.com  www.sabren.com  www.linkwatcher.com  www.zike.net
------------------------------------------------------------------------





More information about the Python-list mailing list