Hi all,
I have another question where I’m not sure if it is a bug or a feature. this time regarding access to template member functions in PyROOT. According to my understanding it should be possible to call those using something like
obj.member("template arguments as C++ type")("arguments")
However this only works after accessing the attribute first on the class object. Otherwise trying to access the member results in an AttributeError. So I have to do
ROOT.MyClass.templateMember
foo = MyClass()
foo.templateMember("std::string")("bar")
It looks like a bug in the attribute lookup but it’s not clear to me if this is maybe somehow intentional and I’m just using it wrong.
Cheers,
Martin
PS: full example: templatemember.py (544 Bytes)
ROOT Version: 6.14/04
Platform: Ubuntu 16.04
Compiler: GCC 8.2, Python 3.6.6