Re: [C++-sig] [] subscript notation with boost::python

2009-02-23 Thread Maik Beckmann
troy d. straszheim schrieb am Montag 23 Februar 2009 um 19:51: > Maik Beckmann wrote: > > Considering what Murray done so far, I really doubt he makes this kind of > > a mistake. :P > > Experts can make this mistake too. I wasn't being condescending. The > er

Re: [C++-sig] [] subscript notation with boost::python

2009-02-23 Thread Maik Beckmann
troy d. straszheim schrieb am Montag 23 Februar 2009 um 19:15: > > Murray Cumming schrieb am Montag 23 Februar 2009 um 12:39: > >> I'm trying to support this notation in python: > >> something = record["somefieldname"] [snip] > You're trying to subscript a class, not an instance of a class. I be

Re: [C++-sig] [] subscript notation with boost::python

2009-02-23 Thread Maik Beckmann
Murray Cumming schrieb am Montag 23 Februar 2009 um 12:39: > I'm trying to support this notation in python: > something = record["somefieldname"] [snip] > I'm now trying to do this with boost::python, like so, because googling > has suggested that this should work: > > boost::python::class_("Record

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

[C++-sig] fancy indexing

2009-01-13 Thread Maik Beckmann
Hello, Question: Is it possible do implement numpy like fancy indexing with boost.python? Motivation: I'm playing with boost.python (and py++) to generate python bindings for some C++ code. N-dimensional arrays are involved with an api like this {{{ template class Array { ... public: Array(tr