How to override a function in a package?
Question: I am using a package from `biopython` called `SubsMat`, I want to override a
function that is located in SubsMats `__init__.py`.

I tried making a class that inherits `SubsMat` like this:

    
    
    from Bio import SubsMat 
    class MyOwnSubsMat(SubsMat):
    

but you cannot inherit a package I guess. I cannot alter the source code
literally since it is a public package on the network. Is there any workaround
for a noob like me?


Answer: You can do that:

    
    
    from Bio import SubsMat 
    SubsMat.function = my_own_replacement_for_function
    

But it will change the package for everyone using it.

