[C++-sig] Re: Boost.Python: few thoughts and questions...

Nicodemus nicodemus at globalite.com.br
Fri Jun 13 23:04:22 CEST 2003


David Abrahams wrote:

>Roman Sulzhyk <roman_sulzhyk at yahoo.com> writes:
>  
>
>>Also, when I'm exposing a class, I think it would be nice to expose all
>>of the virtual methods inherited from base classes, even if they're not
>>explicitly overloaded in the class itself
>>    
>>
>             ^^^^^^^^^^
>"Overridden" again?
>
>And why only virtual functions?  I'd be really surprised if Pyste
>failed to expose *all* of the functions publicly inherited from base
>classes but if that's the case, it should probably be fixed.
>  
>

Pyste does not export the base's member functions in the derived class. 
If the user wants functions from the base class, he should export the 
base class too. Perhaps this behaviour should change?

>BTW, "methods" is a Python term; the C++ term is "function" or "member
>function".  When discussing two languages at once it gets really
>confusing if you're not very careful with terminology.
>
>  
>
>>2. Virtual functions declaring exceptions
>>
>>Basically, a simple construct like this
>>
>>struct foo {};
>>                                                                       
>>        
>>struct World
>>{
>>  virtual const std::string &hello() throw (foo) { return msg; }
>>};
>>
>>causes pyste generated code to choke, because the exception declaration
>>of the wrapper function is looser than the original one (gcc 3.2)
>>    
>>
>
>That's called an "exception specification", not an "exception
>declaration".  Pyste couldn't handle it due to a missing feature in
>GCC_XML, which has just been added today.  I think this will probably
>be handled very soon.
>

As soon as I can get my system up again. 8)

>>3. Specifying the set_policy() for virtual functions
>>
>>It appears that the policy setting is ignored for virtual function
>>declarations.
>>    
>>
>
>What makes you think so?
>
That's a bug, thanks for the report Roman!

Regards,
Nicodemus.






More information about the Cplusplus-sig mailing list