I have to override a function on this egg dicttoxml however the problem is that not being a class I don't know how to override just a particular function.
I tried by creating a new "package" and importing * and then writing out the function I wanted to override but it's ignoring it all together, I'm not sure how or if it can be done.
Edit: This a gist to the code I changed the function is the same just changed item with segment
Edit2: I also added the way I import from the the other file, I called the new "package" dicttoxml_fast
this :
cannot work with your current
dicttoxml_fast
module. You can import this way instead:but this will not make other functions from the original
dicttoxml
use your own version ofconvert_list
. If that was your plan, you'll have to either fork the original (FWIW the author might be interested in your own implementation if it's strictly equivalent and faster) or monkeypatch it:then use
from libs.dicttoxml_fast.dicttoxml_fast import dicttoxml
in your client code.