Small fixes to python and root compatibility issues in newer versions.
Apparently, __format__ now needs to be explicitly implemented for C++ string, which is no longer identical to str.
__format__
string
str