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] 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: 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
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-15 Thread David Abrahams
on Thu Jan 15 2009, Ricardo Abreu wrote: > Hello, > > How do I extract elements from a tuple that I receive from python? > boost::python::tuple doesn't seem to have anything for that in its > interface... t[n] is the nth element of tuple t. -- Dave Abrahams BoostPro Computing http://www.b

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

2009-01-15 Thread Ricardo Abreu
Hello, How do I extract elements from a tuple that I receive from python? boost::python::tuple doesn't seem to have anything for that in its interface... Many thanks, Ricardo Abreu PS: I hope the message is not duplicate. I'm sorry if it is, I am having problems with my client ___