How to override a function in a package? <p>I am using a package from <code>biopython</code> called <code>SubsMat</code>, I want to override a function that is located in SubsMats <code>__init__.py</code>.</p> <p>I tried making a class that inherits <code>SubsMat</code> like this:</p> <pre><code>from Bio import SubsMat class MyOwnSubsMat(SubsMat): </code></pre> <p>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?</p>