Issue432839

classification
Title: overriding methods used in java ctr
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pedronis
Priority: low Keywords:

Created on 2001-06-13.17:39:36 by pedronis, last changed 2001-06-13.21:11:35 by pedronis.

Messages
msg320 (view) Author: Samuele Pedroni (pedronis) Date: 2001-06-13.17:39:36
JAVA:
public class A {
  public A () {
    foo();
  }
  protected void foo () {
    System.out.println("A");
  }
  protected void goo () {
    foo();
  }
}

JYTHON:
import A
class B(A):
    def __init__(self):
        A.__init__(self)
    def foo(self):
        print "B"

b = B() # prints A -- OUCH!! BAD!!
b.foo() # prints B -- good
b.goo() # prints B -- good

-- Daniel Mahler
msg321 (view) Author: Samuele Pedroni (pedronis) Date: 2001-06-13.21:11:35
Logged In: YES 
user_id=61408

already fixed in 2.1a1.
History
Date User Action Args
2001-06-13 17:39:36pedroniscreate