logo       

Re: Re: accessing the python type system: msg#00343

python.c++

Subject: Re: Re: accessing the python type system

David Abrahams wrote:

I've been trying to say that I think the right answer is to provide a
boost::python::object called 'type', something like:

object const type = extract<object>(PyTypeObject*);

so you could do:

object y = type(x);

oh, now I understand (at least partly). But this last line really
*creates* a type object given another object. So I don't understand
why 'type' has to be an object. Why not simply make it a function ?
Users' expectations would still be satisfied (the last line above
would still be valid), but no copy ctor is called.

Regards,
Stefan


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise