Re: [Python-3000] Removing __var

2006-10-01 Thread Greg Ewing
Giovanni Bajo wrote: > Would you want this PEP to address the fact that, in most cases, you just want > to forward all the arguments to super call (aka super.foo(*args, **args)) I dispute this. By far the majority of the super calls that I make are to __init__ methods, and I almost always do *not

Re: [Python-3000] Removing __var

2006-10-01 Thread Greg Ewing
Guido van Rossum wrote: > I think the compiler could treat super as a > reserved word and turn super.foo(args) into __super__(, > self).foo(args). Or something. That sounds reasonable. What would you do in the case of multiple base classes? -- Greg ___

Re: [Python-3000] Removing __var

2006-10-01 Thread Fred L. Drake, Jr.
On Sunday 01 October 2006 17:20, Giovanni Bajo wrote: > Would you want this PEP to address the fact that, in most cases, you just > want to forward all the arguments to super call (aka super.foo(*args, > **args)), ala Dylan's nextmethod? Or is this what you meant with KISS? :) It's not at all c

Re: [Python-3000] Removing __var

2006-10-01 Thread Jim Jewett
On 10/1/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I'm on the fence about dropping __var (some people back in the days > *begged* for it, and it had nothing to do with super; I wonder what > they think now). Until Christian Tanzer's post, the only good use case I had seen was extreme backwa

Re: [Python-3000] Removing __var

2006-10-01 Thread Giovanni Bajo
Guido van Rossum wrote: > But I'm all for adding syntactic sugar to Py3k. Can someone please > draft a proto-PEP? I think the compiler could treat super as a > reserved word and turn super.foo(args) into __super__(, > self).foo(args). Or something. Please be sure you understand the > issues (e.g.

Re: [Python-3000] Removing __var

2006-10-01 Thread Guido van Rossum
I'm on the fence about dropping __var (some people back in the days *begged* for it, and it had nothing to do with super; I wonder what they think now). But I'm all for adding syntactic sugar to Py3k. Can someone please draft a proto-PEP? I think the compiler could treat super as a reserved word a

Re: [Python-3000] Removing __var

2006-09-24 Thread Giovanni Bajo
Christian Tanzer wrote: > I don't use __ for `private`, I use it for making cooperative super > calls (and `__super` occurs 1397 in my sandbox). I think you might be confusing the symptom for the disease. To me, your mail means that Py3k should grow some syntactic sugar for super calls. I guess i

Re: [Python-3000] Removing __var

2006-09-24 Thread Christian Tanzer
"Bob Ippolito" <[EMAIL PROTECTED]> wrote: > On 9/22/06, Thomas Heller <[EMAIL PROTECTED]> wrote: > > Bob Ippolito schrieb: > > > On 9/22/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > > >> On Friday 22 September 2006 13:05, Christian Tanzer wrote: > > >> > It is useful in some situations, t

Re: [Python-3000] Removing __var

2006-09-23 Thread Neil Schemenauer
Bob Ippolito <[EMAIL PROTECTED]> wrote: > The point is that legitimate __ usage is supposedly so rare that this > verbosity doesn't matter. If it's verbose, people definitely won't use > it until they need to, where right now people do it all the time cause > it's "private". It's very rare, in my

Re: [Python-3000] Removing __var

2006-09-22 Thread Bob Ippolito
On 9/22/06, Thomas Heller <[EMAIL PROTECTED]> wrote: > Bob Ippolito schrieb: > > On 9/22/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > >> On Friday 22 September 2006 13:05, Christian Tanzer wrote: > >> > It is useful in some situations, though. In particular, I use a > >> > metaclass that s

Re: [Python-3000] Removing __var

2006-09-22 Thread Thomas Heller
Bob Ippolito schrieb: > On 9/22/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: >> On Friday 22 September 2006 13:05, Christian Tanzer wrote: >> > It is useful in some situations, though. In particular, I use a >> > metaclass that sets `__super` to the right value. This wouldn't work >> > with

Re: [Python-3000] Removing __var

2006-09-22 Thread Bob Ippolito
On 9/22/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > On Friday 22 September 2006 13:05, Christian Tanzer wrote: > > It is useful in some situations, though. In particular, I use a > > metaclass that sets `__super` to the right value. This wouldn't work > > without name mangling. > > This

Re: [Python-3000] Removing __var

2006-09-22 Thread Fred L. Drake, Jr.
On Friday 22 September 2006 13:05, Christian Tanzer wrote: > It is useful in some situations, though. In particular, I use a > metaclass that sets `__super` to the right value. This wouldn't work > without name mangling. This also doesn't work if two classes in the inheritance hierarchy have th

Re: [Python-3000] Removing __var

2006-09-22 Thread Christian Tanzer
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > I propose dropping the __var private name mangling trick for > double-underscores. > > It is rarely used; it smells like a hack; it complicates instrospection > tools; it's not beautiful; and it is not in line with Python's spirit of > "we're all c

Re: [Python-3000] Removing __var

2006-09-22 Thread Ivan Krstić
Raymond Hettinger wrote: > I propose dropping the __var private name mangling trick for > double-underscores. +1. -- Ivan Krstić <[EMAIL PROTECTED]> | GPG: 0x147C722D ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/li

[Python-3000] Removing __var

2006-09-22 Thread Raymond Hettinger
I propose dropping the __var private name mangling trick for double-underscores. It is rarely used; it smells like a hack; it complicates instrospection tools; it's not beautiful; and it is not in line with Python's spirit of "we're all consenting adults". Raymond ___