As I'm currently learning Django / Python, I've not really been using the concept of Classes, yet. As far as I'm aware the method isn't static.. it's just a standard definition.
So let's say I have this Package called Example1
with a views.py
that contains this method:
def adder(x,y):
return x + y
Then I have an Example2
which also has a views.py
where I'd like to use this method adder
.
How would I got about doing this?
EDIT: In Java it would be a simple instantiation then a instantiation.Method()
or if it was static it would be SomeClass.Method()
however I'm unsure how I should approach this in Python.