ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved