Calling private base methods

Paul Rubin http
Sun Apr 15 15:10:53 EDT 2007


Duncan Booth <duncan.booth at invalid.invalid> writes:
> The problem is that when people design interfaces they don't (and 
> cannot) know all the situations in which the code is going to be used in 
> the future. Clearly separating the published interface from the 
> implementation details is a good thing, but physically preventing access to 
> those details is IMHO a bad thing.

The idea is to make the implementation details independent from the
calling program.  For example, I'm using a library now that does
something highly CPU intensive.  To speed up the application, I may
put the library on a completely separate computer, so that the
published API exposed to the caller becomes a wrapper for a network
client, and all those library implementation details are on the other
machine.  That's the ultimate in physical access prevention, there's
good reason to do it, and it completely breaks if the calling program
is using anything except the published API.



More information about the Python-list mailing list