id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4726,Bugs when using named args.,Albin Thoren ,Dave Abrahams,"There seem to be issues when naming function arguments. Same thing happens for class_ defs and init<> functions. Using non-named args {{{f(1,2,3)}}} works fine in all cases below but using named args {{{f(1,2,z=3)}}} works or fails depending on boost python definition. The first two of the following defs fail when using named args. The first one crashes python and the second raises ""did not match C++ signature"" exception. The third version works as expected. {{{#!cpp #include #include int f(int x, int y, int z) { return x*y*z;} BOOST_PYTHON_MODULE(_pylib) { namespace bp = boost::python; // Bug bp::def(""bug1"", &f, (""x"", ""y"", bp::arg(""z""))); bp::def(""bug2"", &f, (""x"", ""y"", ""z"")); // Works bp::def(""works_fine"", &f, (bp::arg(""x""), bp::arg(""y""), bp::arg(""z""))); } }}} Running {{{ bug1(x=1, y=2, z=3) }}} crashes python and {{{bug2(1, 2, z=3)}}} gives an {{{ArgumentError}}} {{{ Boost.Python.ArgumentError: Python argument types in _pylib.bug2(int, int) did not match C++ signature: bug2(int, int, int) }}} Summary of errors: {{{#!python from _pylib import * works_fine(1,2,3) # OK bug1(1,2,3) # OK bug2(1,2,3) # OK works_fine(1, 2, z=3) # OK bug1(1, 2, z=3) # OK bug2(1, 2, z=3) # Error: did not match C++ signature works_fine(x=1, y=2, z=3) # OK bug1(x=1, y=2, z=3) # Error: Python crashes and exits abnormally bug2(x=1, y=2, z=3) # Error: did not match C++ signature }}} I'm using: * boost 1.44. {{{BoostPro}}} Windows pre-built binary for VC++ 2008. * Python 2.6 * {{{sys.version = '2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]')}}} * Microsoft VC++ 2008",Bugs,new,To Be Determined,python USE GITHUB,Boost 1.44.0,Problem,,,