← Winnitude! Search  ·  Reader Mode (1229 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 6 LINKS

Calling super().Method() throws an exception if its not implemented by the base class · Issue #2629 · pythonnet/pythonnet

Repository navigation

Calling super().Method() throws an exception if its not implemented by the base class  #2629


New issue

New issue

Open

Open
Calling super().Method() throws an exception if its not implemented by the base class #2629

Description

@rmadsen-ks's profile rmadsen-ks opened on Oct 9, 2025

In mult-level heirarchies, this causes a stackoverflow exception because the control flow opts to calling the original method instead of the one defined at the super-super level.

For example:

class Class1 {
   public virtual void Method(){

   }
}
class Class2(Class1):
   # This does not implement Method
   pass
class Class3(class2):
   def Method(self):
       super().Method()

In this case, calling Class3.Method will cause a stackoverflow exception because it will call back to the virtual Method method instead of the concrete base class implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions