Re: Calling private base methods

2007-04-20 Thread Alex Martelli
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Isaac > Rodriguez wrote: > > > But the truth is that C++ and Java made a decision to do that for a > > reason, and the times when you have to work around those language > > features come once in a blue moon; they are th

Re: Calling private base methods

2007-04-20 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Isaac Rodriguez wrote: > But the truth is that C++ and Java made a decision to do that for a > reason, and the times when you have to work around those language > features come once in a blue moon; they are the exception, not the > rule, and you don't implement features in

Re: Calling private base methods

2007-04-19 Thread Isaac Rodriguez
> You appear to have led a very sheltered life if the only libraries you ever > use are ones where you can always get a change to the library api in a > timely manner. > The thing here is that we are not talking about my life. I may not have expressed my self correctly, but you are not understand

Re: Calling private base methods

2007-04-18 Thread Duncan Booth
Isaac Rodriguez <[EMAIL PROTECTED]> wrote: >> In real life, the skills of the two people in >> question are likely to be much closer, and since designing libraries for >> use in all kinds of applications is a really hard task, it's likelier >> than the library designer will make an error in design

Re: Calling private base methods

2007-04-18 Thread Isaac Rodriguez
> After all, that's what duck-typing is about. There is no official > interface declaration, just an implicit protocol. And "private" methods > or members are part of that protocol as well. I don't think so. Duck-typing is about implementing the expected public interface, and has nothing to do w

Re: Calling private base methods

2007-04-18 Thread Isaac Rodriguez
> > C++'s and Java's approaches are vitiated by an unspoken assumption that > the library's designer is some kind of demigod, while the writer of code > that uses the library is presumably still struggling with the challenge > of opposable thumbs. That might be your point of view. To me, the li

Re: Calling private base methods

2007-04-15 Thread Alex Martelli
Isaac Rodriguez <[EMAIL PROTECTED]> wrote: > > The fact that I had > > to resort to this trick is a big indication of course that genuinely > > private members (as opposed to a 'keep off' naming convention) are a bad > > idea in general. > > The fact that you had to resort to this trick is a big

Re: Calling private base methods

2007-04-15 Thread Diez B. Roggisch
Paul Rubin schrieb: > Duncan Booth <[EMAIL PROTECTED]> 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 det

Re: Calling private base methods

2007-04-15 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> 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

Re: Calling private base methods

2007-04-15 Thread Duncan Booth
"Isaac Rodriguez" <[EMAIL PROTECTED]> wrote: >> The fact that I had >> to resort to this trick is a big indication of course that genuinely >> private members (as opposed to a 'keep off' naming convention) are a bad >> idea in general. > > > The fact that you had to resort to this trick is a big

Re: Calling private base methods

2007-04-15 Thread Isaac Rodriguez
> The fact that I had > to resort to this trick is a big indication of course that genuinely > private members (as opposed to a 'keep off' naming convention) are a bad > idea in general. The fact that you had to resort to this trick is a big indication that the library you were using is bad desi

Re: Calling private base methods

2007-04-13 Thread Duncan Booth
"Dan Bishop" <[EMAIL PROTECTED]> wrote: > I have a job as a C++ programmer and once tried this trick in order to > get at a private member function I needed. Didn't work: Apparently, VC > ++ includes the access level in its name mangling, so you get linker > errors. > I don't have a copy of VC t

Re: Calling private base methods

2007-04-13 Thread Duncan Booth
"7stud" <[EMAIL PROTECTED]> wrote: >> Really, it does work (probably). There are other ways to get at private >> members in C++ but this is the easiest. > > I can also access private methods of a class if my sister backspaces > over "private" and types "public" instead. > > In your example, no p

Re: Calling private base methods

2007-04-12 Thread 7stud
On Apr 12, 2:02 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > "7stud" <[EMAIL PROTECTED]> wrote: > > On Apr 12, 5:04 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > >> "7stud" <[EMAIL PROTECTED]> wrote: > >> > On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > >> >> Is it possible to cal

Re: Calling private base methods

2007-04-12 Thread Dan Bishop
On Apr 12, 3:02 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > "7stud" <[EMAIL PROTECTED]> wrote: > > On Apr 12, 5:04 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > >> "7stud" <[EMAIL PROTECTED]> wrote: > >> > On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > >> >> Is it possible to cal

Re: Calling private base methods

2007-04-12 Thread Duncan Booth
"7stud" <[EMAIL PROTECTED]> wrote: > On Apr 12, 5:04 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> "7stud" <[EMAIL PROTECTED]> wrote: >> > On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: >> >> Is it possible to call a private base method? I come from a C++ >> >> background, and I li

Re: Calling private base methods

2007-04-12 Thread 7stud
On Apr 12, 5:04 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > "7stud" <[EMAIL PROTECTED]> wrote: > > On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > >> Is it possible to call a private base method? I come from a C++ > >> background, and I liked this construction as my base class has

Re: Calling private base methods

2007-04-12 Thread Maric Michaud
Le jeudi 12 avril 2007 10:47, Jorgen Bodde a écrit : > I thought I understood > how super() worked, but with 'private' members it does not seem to > work. I would add to what is already said, that you should just forget the private -public - protected concepts in Python. There is no access cont

Re: Calling private base methods

2007-04-12 Thread Duncan Booth
"7stud" <[EMAIL PROTECTED]> wrote: > On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: >> Is it possible to call a private base method? I come from a C++ >> background, and I liked this construction as my base class has helper >> methods so that I do not have to duplicate code. >> >

Re: Calling private base methods

2007-04-12 Thread 7stud
On Apr 12, 2:47 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Is it possible to call a private base method? I come from a C++ > background, and I liked this construction as my base class has helper > methods so that I do not have to duplicate code. > I'd like to see some C++ code that does that

Re: Calling private base methods

2007-04-12 Thread Gabriel Genellina
En Thu, 12 Apr 2007 05:47:57 -0300, Jorgen Bodde <[EMAIL PROTECTED]> escribió: > Now that I am really diving into Python, I encounter a lot of things > that us newbies find difficult to get right. I thought I understood > how super() worked, but with 'private' members it does not seem to > work.

Re: Calling private base methods

2007-04-12 Thread Enrico
"Jorgen Bodde" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > Hi All, > > Now that I am really diving into Python, I encounter a lot of things > that us newbies find difficult to get right. I thought I understood > how super() worked, but with 'private' members it does not se

Calling private base methods

2007-04-12 Thread Jorgen Bodde
Hi All, Now that I am really diving into Python, I encounter a lot of things that us newbies find difficult to get right. I thought I understood how super() worked, but with 'private' members it does not seem to work. For example; >>> class A(object): ... def __baseMethod(self): ...