Mohamed Taoufiq EL AISSAOUI
2017-06-24 18:21:18 UTC
Hi all,
After using swig for some projects, I have patched python.cxx to add automatically default parameters, which is very useful for structs or classes having public members.
It avoids initializing an object first, and then set each member's value. With my patch, a default constructor looks like :
def __init__(self, member1 = None, member2 = None)
Please let me know if you are interested on such feature.
Mohamed
After using swig for some projects, I have patched python.cxx to add automatically default parameters, which is very useful for structs or classes having public members.
It avoids initializing an object first, and then set each member's value. With my patch, a default constructor looks like :
def __init__(self, member1 = None, member2 = None)
Please let me know if you are interested on such feature.
Mohamed