Discussion:
[Swig-devel] Python : Add automatic default parameters to constructors
Mohamed Taoufiq EL AISSAOUI
2017-06-24 18:21:18 UTC
Permalink
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

Continue reading on narkive:
Search results for '[Swig-devel] Python : Add automatic default parameters to constructors' (Questions and Answers)
4
replies
can we do system programming through java like that in C language?
started 2006-07-18 03:43:54 UTC
programming & design
Loading...