0

When attempting to call a static method in a superclass I can run code like:

super().doSomething()

in standard Python 3, but the same code doesn't run in Jupyter. The error message is

super(): no arguments

I've tried

super(SubClass).doSomething()

but then the error message is

name 'SubClass' is not defined

even though the code is running in a class named SubClass.

What does work is

SuperClass.doSomething()

That's fine, but it means that making SubClass a subclass of SuperClass is not relevant.

All this is happening in static methods in both SubClass and SuperClass.

Am I missing something, or is there a fix for this?

RussAbbott
  • 2,660
  • 4
  • 24
  • 37

1 Answers1

0

Maybe you are running your code with wrong kernel in Jupyter? For example: https://github.com/jupyter/jupyter/issues/270

Jupyter is just is just a shell, it runs some version of python to evaluate your code.

Evgeny
  • 4,173
  • 2
  • 19
  • 39
  • The same thing happens when I run the code on Jupyter installed on my computer (by conda) and on Google's colabratory. As far as I can tell, it's a Jupyter issue. – RussAbbott Sep 16 '18 at 02:44