I am trying to determine some best practices of function imports and PEP 8 does not explicitly speak about this, in fact the PEP 8 imports section is relatively small. I was wondering what the best practices were when importing using abbreviations.
For example:
import pandas as pd
import numpy as np
Are easily understood because they are very widely used packages. For my own case, I may have some obscure classes or functions in a module that I wish to import like:
from my_module import my_fun_function as mff
...
myvar = mff(input1)
versus
from my_module import my_fun_function
...
myvar = my_fun_function(input1)
Is there a best practices reference on this?