|
Re: registering simple conversions from/to python: msg#00312python.c++
"Ralf W. Grosse-Kunstleve" <rwgk@xxxxxxxxx> writes: > --- Brett Calcott <brett.calcott@xxxxxxxxxxxxxxx> wrote: >> Wow! I was off on some wild goose chase making things complicated, >> thinking I had to write custom converters.. > > Hey, hey, hey... not so fast! > > The add_property approach is cute but doesn't scale. Soon you will find that > you want to add, multiply, divide, etc. using operator overloading and that > you > need a whole bunch of other member functions. Ralf, I think you are assuming a *lot* about what Brett wants to accomplish. The one example he showed gives me no reason to believe that he wants to convert whole classes to/from Python tuples. Maybe he does really want that, and I just missed something... all he *said* he wanted was: >>> obj.name_corresponding_to_several_cplusplus_data_members = some_tuple For which to/from tuple conversions are little or no help. -- Dave Abrahams Boost Consulting www.boost-consulting.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: registering simple conversions from/to python: 00312, Ralf W. Grosse-Kunstleve |
|---|---|
| Next by Date: | Re: accessing the python type system: 00312, David Abrahams |
| Previous by Thread: | Re: Re: registering simple conversions from/to pythoni: 00312, Ralf W. Grosse-Kunstleve |
| Next by Thread: | Re: Re: registering simple conversions from/to python: 00312, Ralf W. Grosse-Kunstleve |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |