Re: [C++-sig] Pyste bug: protected virtual methods
by Niall Douglas other posts by this author
Oct 27 2003 6:00PM messages near this date
Re: [C++-sig] Pyste bug: protected virtual methods
|
[C++-sig] Improved version of Lijun Qin's multithreading patch
--PGPMime-Boundary-FF4D852B
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
On 27 Oct 2003 at 16:58, Nicodemus wrote:
> Another solution would be to expose the protected members, but that
> would make them public in Python. I think this solution is more
> flexible, since the purpose of a protected method is to allow
> subclasses to call it... and the user can always rename the methods to
> prepend an "_", following Python's convention. What do you think?
Well you can promote protected or private members to public when
subclassing, so this looks like a good idea.
If you wanted to make it really pretty, you could make all protected
members exposed using "_" as you suggest. They are after all not for
public use.
Cheers,
Niall
--PGPMime-Boundary-FF4D852B
Content-Type: application/pgp-signature
-----BEGIN PGP MESSAGE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP53HvcEcvDLFGKbPEQKyiQCgn/zwzWahAN/AT6NtK/eLbQGyZ18AnRw7
uLtEFvb7e2+Vs3FrF5DZhzXD
=m0L8
-----END PGP MESSAGE-----
--PGPMime-Boundary-FF4D852B--
Attachments:
unknown1
unknown1
unknown2
unknown3
unknown4
Thread:
Niall Douglas
Nicodemus
Niall Douglas
|