Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jython override method with same name

I saw a similar problem occurred on JRuby back in 2010 when we would try to override in Jruby a method that was overloaded orginally on the java source code. How do we deal with this in Jython? More specifically, how can i specify for one of the methods that are overloaded to be override and ignore the remaining or how can I override all of them?

Thank you

like image 993
Oeufcoque Penteano Avatar asked Nov 13 '22 00:11

Oeufcoque Penteano


1 Answers

Python does not support method overloading (but it does support default values).

def my_function(paramA, paramB = None):
  pass

Since Jython is merely a Python implementation, I belive the same stands true.

like image 157
WhyNotHugo Avatar answered Dec 25 '22 12:12

WhyNotHugo