[C++-sig] Pyste bug: can't set different return policies on method

Nicodemus nicodemus at globalite.com.br
Wed Sep 24 00:25:14 CEST 2003


Niall Douglas wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On 21 Sep 2003 at 14:32, Nicodemus wrote:
>
>  
>
>>That's a limitation of Pyste right now. One of the future plans is to
>>allow metaprogramming inside the pyste files, which would allow you to
>>do something like this:
>>
>>FXFile = Class(...)
>>
>>if not FXFile.name.static:
>>    set_policy(FXFile.name, return_internal_reference)
>>
>>But this might take a while to be implemented... I haven't had much
>>time to work on Pyste lately. But what you think of this solution?
>>    
>>
>
>Looks to me like you're making work for yourself.
>
>How about instead when pyste encounters two methods with the same 
>name it puts an array at FXFile.name ie; now it's FXFile.name[0] and 
>FXFile.name[1]. This ensures you don't accidentally set the policy 
>incorrectly for both when you meant one of them, plus it's much 
>easier to code.
>  
>

Hmm, I will take a look at it, thanks for the suggestion. Just can't 
promise it for right now, because I'm pretty busy. I'll probably be able 
to code something next week.

Regards,
Nicodemus.






More information about the Cplusplus-sig mailing list