Re: [C++-sig] How to get items from a tuple

2009-01-16 Thread Ricardo Abreu
Thank you, but I had tried that and it doesn't seem to work... look: http://codepad.org/kA61P8r0 What am I doing wrong? Thanks, Ricardo Abreu David Abrahams wrote: on Thu Jan 15 2009, Ricardo Abreu wrote: Hello, How do I extract elements from a tuple that I receive from python? boost::pyt

Re: [C++-sig] How to get items from a tuple

2009-01-16 Thread Stefan Seefeld
Ricardo Abreu wrote: Thank you, but I had tried that and it doesn't seem to work... look: http://codepad.org/kA61P8r0 What am I doing wrong? In the sake of understanding the code a little better you may write it a bit less compact. Then you will realize that the item extraction you were ask

Re: [C++-sig] How to get items from a tuple

2009-01-16 Thread Ricardo Abreu
Well, thank you. The problem was really that I didn't notice I had to extract the int explicitly. About the code being too compact, I'm not sure I got what you mean, unless you would want me to have a variable in between the tuple and the print just to hold the result of the cast, in which cas

Re: [C++-sig] How to get items from a tuple

2009-01-16 Thread Stefan Seefeld
Ricardo Abreu wrote: Well, thank you. The problem was really that I didn't notice I had to extract the int explicitly. About the code being too compact, I'm not sure I got what you mean, unless you would want me to have a variable in between the tuple and the print just to hold the result of

Re: [C++-sig] py++ with template member function of template class

2009-01-16 Thread Maik Beckmann
Roman Yakovenko gmail.com> writes: > > / > > // test template member function in template class > > // THIS WON'T WORK! > > template > > class BFunc > > { > > public: > > template > > T foo(const T& t) co

Re: [C++-sig] can boost::python class imlement buffer protocol?

2009-01-16 Thread Neal Becker
Neal Becker wrote: > David Abrahams wrote: > >> >> on Wed Jan 07 2009, Neal Becker wrote: >> >>> This would require filling in tp_as_buffer field in the PyTypeObject >>> structure for the >>> class. Is this possible? Any clue how/where this could be done? >> >> I honestly don't know the ans