I'm working on a Python project which extends the functionality of some other python modules. Some are part of the standard Python library and mostly use the PSF License agreement while some are provided by a third-party and mostly use BSD licenses. All allow redistribution of modified code with attribution.
I understand that in most cases I need to include the license in the source code or some place where it is easily reference. My question concerns how best to separate modified code from the rest of the project since the rest of the project is unrelated and will carry a different license and copyright.
As far as I can tell, there are two ways to do this, in-line or by separating out derived code into it's own modules. In-line could be done through code comments or within class or function doc strings. The other option creates number of small, but technically unneeded modules, but would make it easier to distinguish derived code from the rest of the project and deprecate them if the modules later incorporated the missing capabilities.
Are these both valid options and is there a preferred or more Pythonic way?