[C++-sig] Pyste bug: can't set different return policies on method
Niall Douglas
s_sourceforge at nedprod.com
Tue Sep 23 00:24:32 CEST 2003
-----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.
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA+AwUBP292oMEcvDLFGKbPEQIM1gCVG9/s4uRM2nea4hPOXanaiIzvaACdEvYD
S8a1XOFcXvM6aCxaYMDxP4Y=
=Yvy1
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list