[Python-Dev] New Super PEP (original) (raw)
Lino Mastrodomenico l.mastrodomenico at gmail.com
Sun Apr 29 13:26:20 CEST 2007
- Previous message: [Python-Dev] New Super PEP
- Next message: [Python-Dev] New Super PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2007/4/29, Gustavo Carneiro <gjcarneiro at gmail.com>:
On 29/04/07, James Y Knight <foom at fuhm.net> wrote: > Since calling super with any > arguments other than the exact same arguments you have received is > nearly always wrong,
Erm. Excuse me, but are you saying this code is wrong? class Rectangle: def init(self, width, height): self.width = width self.height = height class Square: def init(self, side): Rectangle.init(self, side, side)
You probably mean "class Square(Rectangle):". Anyway it's not wrong, but it isn't multiple-inheritance-friendly either.
-- Lino Mastrodomenico E-mail: l.mastrodomenico at gmail.com
- Previous message: [Python-Dev] New Super PEP
- Next message: [Python-Dev] New Super PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]