is Python fully object oriented ?

Moshe Zadka moshez at zadka.site.co.il
Sat Jan 13 09:30:44 EST 2001


On Fri, 12 Jan 2001, Ben Hutchison <benh at intelligenesis.net> wrote:

> 1. Most significantly, Python requires the "self" or "this" reference to be
> explicitly declared. This seems like a bit of a hassle if you do pure OO
> development with python; lots of typing! 

Have you looked at Python's standard library? IMHO, it is written in a very
OO style, and yet, the Python maintainers seem to get over that "lots of
typing". Since most Python programmers read the standard library to find
Python idioms (or they should -- it is Python code written by Python 
experts), most people tend to follow that style.

> 2. Access control is more informal in Python than C++/Java. 

It is just as informal as in C++, only C++ pretends otherwise...

> * Is Pythons leading underscore mechanism more of a convention?

Depends on what part of "Python" you ask. Pythonic security mechanism
(e.g., those built-in to Zope) can surely use things like leading 
underscores for security.

> * Can a class declare a priviledged API availalbe only to subclasses?

Note that Knuth regrets adding "protected" to C++. It would take a 
really bad Guido day to add a feature that the C++ designer regrets <wink>
-- 
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!




More information about the Python-list mailing list