[C++-sig] Pyste bug: implicit constructors

Nicodemus nicodemus at esss.com.br
Tue Feb 15 00:45:32 CET 2005


Nicodemus wrote:

> Niall Douglas wrote:
>
>> I suggest:
>>
>>        artificial = element.get('artificial', False)
>>        ctor = Constructor(name, classname, params, visib)
>>        if artificial and not ctor.IsCopy():
>>            # we don't want artificial constructors except copy ones
>>            ctor = Unknown('__Unknown_Element_%s' % id)
>>
>> ... but this may not be the right thing either.
>>  
>>

I guess the correct thing would be to instantiate the Constructors 
anyway, but only export those that are non-artificial. This way, we get 
the usual Boost.Python behaviour. What you think?

Regards,
Nicodemus.



More information about the Cplusplus-sig mailing list