Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Kay Schluehr
Guido van Rossum wrote: On 1/6/06, Kay Schluehr [EMAIL PROTECTED] wrote: Then simply reject the PEP and the discussion can be stopped on comp.lang.python too. Only in the most severe cases does it make sense to create a PEP specifically to be rejected. Or why do you think it should be

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Martin v. Löwis
Ian Bicking wrote: would have to be translated to this this: inst = Foo() f = Foo.bar meth = bind(f, inst) print meth(1, 2) +1 for an explicit bind unbound method operation, although I would spell it as inst = Foo() f = Foo.bar meth = f.bind(inst) print meth(1,

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Thomas Wouters
On Sat, Jan 07, 2006 at 05:12:06PM -0800, Guido van Rossum wrote: On 1/6/06, Kay Schluehr [EMAIL PROTECTED] wrote: Then simply reject the PEP and the discussion can be stopped on comp.lang.python too. Only in the most severe cases does it make sense to create a PEP specifically to be

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Martin v. Löwis
Thomas Wouters wrote: Yet if it isn't recorded, people will keep bringing it up. How about a 'rejected ideas' PEP for ideas that are right out no matter how people argue? Recorded it is, in the mailing list archive. However, a central place might be better, preferably with referrals to

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ralf W. Grosse-Kunstleve
--- Alexander Kozlovsky [EMAIL PROTECTED] wrote: What do you think about this? I (who writes Python code for a living) love it! See also: http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html ***Please*** make Python more selfish. Note that this is also an obvious avenue for

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Fredrik Lundh
Thomas Wouters wrote: Only in the most severe cases does it make sense to create a PEP specifically to be rejected. Yet if it isn't recorded, people will keep bringing it up. How about a 'rejected ideas' PEP for ideas that are right out no matter how people argue? A single PEP, with

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Fredrik Lundh
Ralf W. Grosse-Kunstleve wrote: ***Please*** make Python more selfish. Note that this is also an obvious avenue for significant performance increases. If self is implicit you don't have to do the dictionary lookup for self all the time as is the case now. what dictionary lookup ? /F

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ralf W. Grosse-Kunstleve
--- Fredrik Lundh [EMAIL PROTECTED] wrote: Ralf W. Grosse-Kunstleve wrote: ***Please*** make Python more selfish. Note that this is also an obvious avenue for significant performance increases. If self is implicit you don't have to do the dictionary lookup for self all the time as is

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Fredrik Lundh
Ralf W. Grosse-Kunstleve wrote: what dictionary lookup ? IIUC, self is first looked up in the local dictionary. no, self is a local variable. self.x means that x is looked up in the in- stance dictionary, though. Please try the code below to see the performance impact. oh, please. do

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ralf W. Grosse-Kunstleve
--- Guido van Rossum [EMAIL PROTECTED] wrote: On 1/6/06, Armin Rigo [EMAIL PROTECTED] wrote: On Fri, Jan 06, 2006 at 12:56:01AM +0300, Alexander Kozlovsky wrote: There are three different peculiarity in Python 2.x in respect of 'self' method argument: Yuk! This has been discussed

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Thomas Wouters
On Sun, Jan 08, 2006 at 07:35:53AM -0800, Ralf W. Grosse-Kunstleve wrote: IIUC, self is first looked up in the local dictionary. No. Local variables are stored in a tuple (more or less,) and indexed by, er, index. Loading a local variable onto the stack is a fairly fast operation. Please try

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ralf W. Grosse-Kunstleve wrote: --- Fredrik Lundh [EMAIL PROTECTED] wrote: Please try the code below to see the performance impact. oh, please. do you seriously think that if you don't have to type self yourself, Python will suddenly be able to turn all instance variables into local function

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ralf W. Grosse-Kunstleve
--- Thomas Wouters [EMAIL PROTECTED] wrote: The main difference isn't the lookup of 'self', it's the attribute retrieval of 'x' from 'self'. I see. Thanks! If you put 'self' into a special category (with corresponding C code), couldn't you use the same indexing tricks as for local variables

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ralf W. Grosse-Kunstleve
--- Fredrik Lundh [EMAIL PROTECTED] wrote: Please try the code below to see the performance impact. oh, please. do you seriously think that if you don't have to type self yourself, Python will suddenly be able to turn all instance variables into local function variables without any

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Thomas Wouters
On Sun, Jan 08, 2006 at 08:09:22AM -0800, Ralf W. Grosse-Kunstleve wrote: --- Thomas Wouters [EMAIL PROTECTED] wrote: The main difference isn't the lookup of 'self', it's the attribute retrieval of 'x' from 'self'. I see. Thanks! If you put 'self' into a special category (with

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Phillip J. Eby
At 08:09 AM 1/8/2006 -0800, Ralf W. Grosse-Kunstleve wrote: --- Thomas Wouters [EMAIL PROTECTED] wrote: The main difference isn't the lookup of 'self', it's the attribute retrieval of 'x' from 'self'. I see. Thanks! If you put 'self' into a special category (with corresponding C code),

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Tim Peters
[Thomas Wouters] My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a single location. I thought PEP's where supposed to be that, and if I have

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Martin v. Löwis
Thomas Wouters wrote: My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a single location. Why would a single Wiki page not be accessible in a

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Martin v. Löwis
Martin v. Löwis wrote: But they might suffer from misunderstandings, such as your misunderstanding in how local variables work and whether 'self' is looked up in a dictionary. So it's being dumb - just being uninformed. Sorry: *not* being dumb is what I wanted to say. Regards, Martin

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Thomas Wouters
On Sun, Jan 08, 2006 at 06:31:35PM +0100, Martin v. Löwis wrote: Thomas Wouters wrote: My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ian Bicking
Tim Peters wrote: [Thomas Wouters] My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a single location. I thought PEP's where supposed to be

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ian Bicking wrote: Tim Peters wrote: [Thomas Wouters] My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a single location. I thought PEP's

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Thomas Wouters
On Sun, Jan 08, 2006 at 02:43:17PM -0600, Ian Bicking wrote: [T]he editorialization that Python isn't going to be a functional language is both rather inaccurate, misses the real reason for statements, and needlessly alienates people who like functional programming So... maybe Guido or

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Ian Bicking
Thomas Wouters wrote: [T]he editorialization that Python isn't going to be a functional language is both rather inaccurate, misses the real reason for statements, and needlessly alienates people who like functional programming So... maybe Guido or python-dev should write/vet the justifications

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Martin v. Löwis
Ian Bicking wrote: I just don't want people to feel discouraged when they try to contribute to the Python community and a PEP 13 could help direct people towards areas where their contributions are more likely to be useful. Also I think it is unfair to use python-list to clarify things

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ian Bicking wrote: I just don't want people to feel discouraged when they try to contribute to the Python community and a PEP 13 could help direct people towards areas where their contributions are more likely to be useful. but people have a lot of options, probably more effective, ranging

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Tim Peters
[Martin] But now: who is going to write it? Guido should write it clearly won't work. And no, I'm explicitly not volunteering either. [Thomas] Well, the PEP will be mostly boilerplate anyway (unless there's a sudden influx of old ideas) so I'm sure I can whip something up before next

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-07 Thread Guido van Rossum
On 1/6/06, Kay Schluehr [EMAIL PROTECTED] wrote: Then simply reject the PEP and the discussion can be stopped on comp.lang.python too. Only in the most severe cases does it make sense to create a PEP specifically to be rejected. Or why do you think it should be discussed there again and

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Fabien Schwob
Example 1 (Python 2.x): --- class Foo: def __init__(self, x): # 1: Explicit 'self' argument self.x = x # 2: 'self' must be used explicitly def bar(self, a, b): # 3: There are three arguments... print

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Armin Rigo
Hi Alexander, On Fri, Jan 06, 2006 at 12:56:01AM +0300, Alexander Kozlovsky wrote: There are three different peculiarity in Python 2.x in respect of 'self' method argument: Yuk! This has been discussed again and again already. *Please* move this discussion to comp.lang.python. A bientot,

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Alexander Kozlovsky
Hello! Ian Bicking wrote: (As an aside directed at the original PEP, I think discussion of leaving self out of expressions, e.g., .x for self.x, should be separate from the rest of this PEP). Yes, I'm fully agree. Nick Coghlan wrote: The main concern I have is with the answer to the

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Guido van Rossum
On 1/6/06, Armin Rigo [EMAIL PROTECTED] wrote: On Fri, Jan 06, 2006 at 12:56:01AM +0300, Alexander Kozlovsky wrote: There are three different peculiarity in Python 2.x in respect of 'self' method argument: Yuk! This has been discussed again and again already. *Please* move this

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Kay Schluehr
Guido van Rossum wrote: Yuk! This has been discussed again and again already. *Please* move this discussion to comp.lang.python. Yes please. This won't change. Then simply reject the PEP and the discussion can be stopped on comp.lang.python too. Or why do you think it should be discussed

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-05 Thread Alexander Kozlovsky
I wrote: 5. Each function have two constant attributes, __class__ and __self__, both of them have value 'None' Of course, this attributes have names 'im_class' and 'im_self', as before, but can be used with any function. I have not sleep enough last night :) Best regards, Alexander

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-05 Thread Nick Coghlan
Alexander Kozlovsky wrote: Hello! I have some proposal for Python 3.0 (interesting one, from my point of view). I'm sorry for my English, it is not very good. Your English seems fine. About the only thing I noticed is that you have the meaning of 'function arguments' vs 'function