Is it possible to extend functions?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JorensM

I wanted to know if it’s possible to extend a function, so that the new inherited function executed code from both the parent function and the new function.

For example, let’s say I have a node with the function do_something() that does action x

What I want is to create an inherited node with the function do_something() being extended to do something more. so it would do action a as well as action b

:bust_in_silhouette: Reply From: JorensM


to create an inherited function which executed new code IN ADDITION to the previous code, call the parent function like this:

func do_something():
      #additional code