#2 trunk fails on call policy with "no attribute 'lstrip' "

closed
Roman
None
5
2009-01-16
2009-01-12
MaikBeckmann1978
No

the project inside the attached tarball fails with
{{{
File "/usr/lib/python2.6/site-packages/pyplusplus/decl_wrappers/algorithm.py", line 91, in create_identifier
full_name = full_name.lstrip( '::' )
AttributeError: 'function' object has no attribute 'lstrip'
}}}

The tarball contains my build log
- make.log

I'm running revision 1560.

-- Maik

PS: sorry for the bad bug report. I'm pretty new to
py++

Discussion

  • bug triggering project in a tarball

     
    Attachments
  • Same for py++-1.0

     
  • Roman
    Roman
    2009-01-15

    Thanks for bug reporting.

    Can you submit the whole call stack or something, that reproduce the bug?

    Thanks

     
  • Roman
    Roman
    2009-01-15

    • assigned_to: nobody --> roman_yakovenko
    • status: open --> closed-rejected
     
  • Roman
    Roman
    2009-01-15

    Okey, I found it.

    You made few mistakes in the following line: get_reference.call_policies = call_policies.return_value_policy(call_policies.return_internal_reference)
    1. You pass return_internal_reference, which is a function
    2. You can create such combination. See Boost.Python manuals

    Please contact me via mailing list and I will help you if you still has a problem. Py++ contains few solutions for exposing such functions.

    P.S. float is immutable Python type, so it could not be exposed by reference.

     
    • status: closed-rejected --> closed
     
  • Ok, I get that what I've done just doesn't make sense.

    However, I wonder why
    {{{
    get_reference.call_policies =
    call_policies.return_value_policy(call_policies.return_by_value)
    }}}
    doesn't give the attribute error while
    {{{
    get_reference.call_policies =
    call_policies.return_value_policy(call_policies.return_internal_reference)
    }}}
    does.

    Thanks for your work!