Assume the Python function def my_function()
that is part of the class class MyClass()
, which itself is part of the module mymodule.py
, which is part of the package mypackage
.
mypackage/
mypackage/mymodule.py
user$ cat mypackage/mymodule.py
#class MyClass(object):
# def my_function(self):
# ...
In a scientific manuscript, I would like to refer to the function my_function
in the shortest and most precise way possible and simultaneously provide the info in which package, module and class this function is located.
Hence, would it be advisable to refer to it as: mypackage.mymodule.MyClass.my_function()
?
(In comparison, in R
it is common to refer to a specific function as myRpackage::my_R_function
.)