[Python-bugs-list] [ python-Bugs-764003 ] super() does not work as documented

SourceForge.net noreply@sourceforge.net
Tue, 01 Jul 2003 08:18:48 -0700


Bugs item #764003, was opened at 2003-07-01 17:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=764003&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bastian Kleineidam (calvin)
Assigned to: Nobody/Anonymous (nobody)
Summary: super() does not work as documented

Initial Comment:
According to the docs, I can use class names as type
object, but that does not work. Strange enough, this is
used in the python core modules (ie random.py):

> python2.3
Python 2.3b2 (#2, Jun 30 2003, 10:50:53) 
[GCC 3.3.1 20030626 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> class a:
...     def f (self):
...         print 1
... 
>>> class b(a):
...     def f (self):
...         super(b, self).f()
...         print 2
... 
>>> b().f()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "<stdin>", line 3, in f
TypeError: super() argument 1 must be type, not classobj


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=764003&group_id=5470