[C++-sig] Mapping C++ typedefs to Python

Hans Meine hans_meine at gmx.net
Wed Nov 7 21:55:11 CET 2007


On Mittwoch 07 November 2007, Sylvain Pion wrote:
> > Bar = Foo # 'Bar' is now the equivalent of C++'s typedef, aliasing 'Foo'
>
> Thanks everybody for the suggestions and explanations.
> I finally solved the problem within Python.
>
> The reason I asked to do this within C++ using Boost.Python is that
> this would have regrouped my code in the same place (after all, this
> is a property of the C++ code which I want to describe).

I am using
  scope().attr("Bar") = scope().attr("Foo");
to achieve the same using the BPL.

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071107/35b78c51/attachment.pgp>


More information about the Cplusplus-sig mailing list