title: Boost.Python constructor with optional arguments
body: <p>I want to use Boost.Python to create a Python wrapper for a C++ constructor with optional arguments. I want the Python wrapper to act like this:</p>
  
  <pre><code>class Foo():
    def __init__(self, filename, phase, stages=None, level=0):
      """
      filename -- string
      phase -- int
      stages -- optional list of strings
      level -- optional int
      """
      if stages is None:
        stages = []
      # ...
  </code></pre>
  
  <p>How do I do this with Boost.Python? I don't see how to do it with <code>make_constructor</code>, and I don't know how to make a constructor with <code>raw_function</code>. Is there some better documentation than <a href="http://www.boost.org/doc/libs/1_55_0/libs/python/doc/v2/make_function.html" rel="nofollow">this</a> out there?</p>
  
  <p>My specific problem is trying to add two optional arguments (stages and level) to these two constructors:</p>
  
  <p><a href="https://github.com/BVLC/caffe/blob/rc3/python/caffe/_caffe.cpp#L76-L96" rel="nofollow">https://github.com/BVLC/caffe/blob/rc3/python/caffe/_caffe.cpp#L76-L96</a></p>