[Python-bugs-list] [ python-Bugs-474737 ] Problem overriding int.init() (original) (raw)
noreply@sourceforge.net noreply@sourceforge.net
Wed, 24 Oct 2001 21:48:16 -0700
- Previous message: [Python-bugs-list] [ python-Bugs-474238 ] 2.2b1 src rpm doesn't include Lib/email/
- Next message: [Python-bugs-list] [ python-Bugs-469773 ] docs should include man page
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bugs item #474737, was opened at 2001-10-24 21:48 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=474737&group_id=5470
Category: Type/class unification Group: Python 2.2 Status: Open Resolution: None Priority: 5 Submitted By: Mark J (average) Assigned to: Guido van Rossum (gvanrossum) Summary: Problem overriding int.init()
Initial Comment: Given:
class I(int): def init(self, init_value, extra_param="test"): print extra_param int.init(self, init_value)
Python 2.2b1 (#1, Oct 19 2001, 23:11:09) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)] on linux2
i = I(1) #fine test #yes, new constructor used i 1 #value set correctly
i = I(2, "oops") Traceback (most recent call last): File "", line 1, in ? TypeError: an integer is required i = I(3, dummy="oops") Traceback (most recent call last): File "", line 1, in ? TypeError: dummy is an invalid keyword argument for this functionThanks,
Mark
You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=474737&group_id=5470
- Previous message: [Python-bugs-list] [ python-Bugs-474238 ] 2.2b1 src rpm doesn't include Lib/email/
- Next message: [Python-bugs-list] [ python-Bugs-469773 ] docs should include man page
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]