Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
Bruno Desthuilliers wrote: > Ron Adam a écrit : >> >> TheFlyingDutchman wrote: >> >>> I am not talking about the way it does it, but rather, the way it >>> could do it or... could have done it. That requires no knowledge of >>> how the interpreter currently does it unless I am proposing something

Re: Python 3K or Python 2.9?

2007-09-21 Thread Bruno Desthuilliers
Ron Adam a écrit : > > > TheFlyingDutchman wrote: > >> I am not talking about the way it does it, but rather, the way it >> could do it or... could have done it. That requires no knowledge of >> how the interpreter currently does it unless I am proposing something >> that no interpreter in the w

Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
TheFlyingDutchman wrote: > I am not talking about the way it does it, but rather, the way it > could do it or... could have done it. That requires no knowledge of > how the interpreter currently does it unless I am proposing something > that no interpreter in the world could ever do. Yes, there

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-19 Thread Bruno Desthuilliers
Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > (snip) >(For those joining only recently, my full legal name is "Aahz", which I >changed from my former name precisely because of attitudes like Bruno's.) >> >>For the record, I usually don

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Aahz a écrit : >> In article <[EMAIL PROTECTED]>, >> Steve Holden <[EMAIL PROTECTED]> wrote: >>> Aahz wrote: In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Aahz a écrit

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-18 Thread Bruno Desthuilliers
Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Steve Holden <[EMAIL PROTECTED]> wrote: >> Aahz wrote: >>> In article <[EMAIL PROTECTED]>, >>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]>

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-18 Thread Bruno Desthuilliers
Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> Aahz a écrit : >>> In article <[EMAIL PROTECTED]>, >>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: But what, given that I'm an AOL user still thinking it's kewl to hide behind a pseu

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >>> Aahz a écrit : In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > But wh

Re: Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-18 Thread Steve Holden
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> Aahz a écrit : >>> In article <[EMAIL PROTECTED]>, >>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: But what, given that I'm an AOL user still thinking it's kewl to hide behind a pseudo,

Using pseudonyms (was Re: Python 3K or Python 2.9?)

2007-09-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Aahz a écrit : >> In article <[EMAIL PROTECTED]>, >> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >>> >>> But what, given that I'm an AOL user still thinking it's kewl to hide >>> behind a pseudo, what else would y

Re: Python 3K or Python 2.9?

2007-09-18 Thread Bruno Desthuilliers
Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> But what, given that I'm an AOL user still thinking it's kewl to hide >> behind a pseudo, what else would you expect ? > > What exactly is a "pseudo", pray tell? Sorry : a pseudonym (a nickname).

Re: Python 3K or Python 2.9?

2007-09-17 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >But what, given that I'm an AOL user still thinking it's kewl to hide >behind a pseudo, what else would you expect ? What exactly is a "pseudo", pray tell? -- Aahz ([EMAIL PROTECTED]) <*> http://

Re: Python 3K or Python 2.9?

2007-09-17 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : > On Sep 17, 4:02 am, Steve Holden <[EMAIL PROTECTED]> wrote: (snip) > I made a complaint about a small design choice. It's by no mean a "small" design choice. > I also made it in the > past tense at least once ("should have done it") and explicitly > expressed that I

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
On Sep 17, 4:02 am, Steve Holden <[EMAIL PROTECTED]> wrote: > TheFlyingDutchman wrote: > >> The other half of the confusion is cleared up by considering that > >> Python methods are ordinary functions that don't magically "know" in > >> which "class" context they are executing: they must be told vi

Re: Python 3K or Python 2.9?

2007-09-17 Thread Robin Becker
Graham Dumpleton wrote: >... > In that blog, Guido says: > > """Concurrency: It seems we're now happily out exploring here. I'm > looking forward to benchmarks showing that PP or similar (or > dissimilar!) solutions actually provide a performance gain. Another > route I'd like to see explored

Re: Python 3K or Python 2.9?

2007-09-17 Thread Daniel Larsson
On 9/13/07, Stefan Bellon <[EMAIL PROTECTED]> wrote: > > On Thu, 13 Sep, TheFlyingDutchman wrote: > > > Bruce said that no other mainstream OO language is explicitly passing > > the object as a parameter to class methods. > > Ada 95 does. And Ada 95 was the first standardized OO language. Now tha

Re: Python 3K or Python 2.9?

2007-09-17 Thread Steve Holden
TheFlyingDutchman wrote: >> The other half of the confusion is cleared up by considering that >> Python methods are ordinary functions that don't magically "know" in >> which "class" context they are executing: they must be told via the >> first parameter. >> > > They can be told all they want by

Re: Python 3K or Python 2.9?

2007-09-17 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : > > If you wanna know why the Renault Dauphine requires the driver to pull > down on the rearview mirror in order to shift into reverse you simply > need to open the hood and remove the engine and disassemble the > transmission and you will see that it has no way of dis

RE: Python 3K or Python 2.9?

2007-09-17 Thread Delaney, Timothy (Tim)
Ben Finney wrote: > The latter two statements are equivalent. The 'instance.method(args)' > syntax is just sugar for 'Class.method(instance, args)'. Only in the case that "instance" is an instance of "Class", and not an instance of a subclass of "Class". For example, the following are not equival

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
If you wanna know why the Renault Dauphine requires the driver to pull down on the rearview mirror in order to shift into reverse you simply need to open the hood and remove the engine and disassemble the transmission and you will see that it has no way of distinguishing a shift into third from a

Re: Python 3K or Python 2.9?

2007-09-17 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : >> >> >> Hi, I'm new to Python, I don't even fully know the language, never done >> a full project in Python. What's more, probably I'll never will. >> But that's not the point, the point is I want YOU people to modify the >> language you know in and out, the program wi

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
> The other half of the confusion is cleared up by considering that > Python methods are ordinary functions that don't magically "know" in > which "class" context they are executing: they must be told via the > first parameter. > They can be told all they want by the compiler/runtime - implicitly

Re: Python 3K or Python 2.9?

2007-09-17 Thread TheFlyingDutchman
> > > > Hi, I'm new to Python, I don't even fully know the language, never done > a full project in Python. What's more, probably I'll never will. > But that's not the point, the point is I want YOU people to modify the > language you know in and out, the program with which you've done many > sys

Re: Python 3K or Python 2.9?

2007-09-16 Thread Bruno Desthuilliers
Erik Jones a écrit : > On Sep 14, 2007, at 11:54 PM, David Trudgett wrote: > >> TheFlyingDutchman <[EMAIL PROTECTED]> writes: >> (snip) >> >> Several languages use the "object.method(args)" form, which is syntactic >> sugar for "method(object, other_args)" which Ada, for instance, uses. >> Knowi

Re: Python 3K or Python 2.9?

2007-09-16 Thread Bruno Desthuilliers
John Roth a écrit : > On Sep 12, 11:35 am, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > >>On Sep 12, 4:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >> >>>Ivan Voras wrote: >>> What does "self" have to do with an object model? It's an function/method argument that might as well b

Re: Python 3K or Python 2.9?

2007-09-15 Thread Erik Jones
On Sep 14, 2007, at 11:54 PM, David Trudgett wrote: > TheFlyingDutchman <[EMAIL PROTECTED]> writes: > >> The confusing way about the current Python method when you first >> encounter it is >> why is "self" being passed in when you write the function but not >> when you call it. If the compiler is

Re: Python 3K or Python 2.9?

2007-09-14 Thread David Trudgett
TheFlyingDutchman <[EMAIL PROTECTED]> writes: > The confusing way about the current Python method when you first > encounter it is > why is "self" being passed in when you write the function but not > when you call it. If the compiler is smart enough to know that > > a = MyClass() > a.Som

Re: Python 3K or Python 2.9?

2007-09-14 Thread Ricardo Aráoz
Bruno Desthuilliers wrote: > TheFlyingDutchman a écrit : >> Well I'm with Bruce Eckel - there shouldn't be any argument for the >> object in the class method parameter list. > > def fun(obj, *args, **kw): ># generic code here that do something with obj > > import some_module > some_module.Som

Re: Python 3K or Python 2.9?

2007-09-14 Thread George Sakkis
On Sep 12, 1:35 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Sep 12, 4:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > > Ivan Voras wrote: > > > What does "self" have to do with an object model? It's an > > > function/method argument that might as well be hidden in the > > > compi

Re: Python 3K or Python 2.9?

2007-09-14 Thread John Roth
On Sep 12, 11:35 am, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Sep 12, 4:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > > Ivan Voras wrote: > > > What does "self" have to do with an object model? It's an > > > function/method argument that might as well be hidden in the > > > compi

Re: Python 3K or Python 2.9?

2007-09-14 Thread Terry Reedy
"Bjoern Schliessmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] That's interesting. BTW, do you know something (apart from the dis docs) that's worth reading if you're interested in Python byte code? -- That is the only Python specific thing I remember reading.

Re: Python 3K or Python 2.9?

2007-09-14 Thread Duncan Booth
Piet van Oostrum <[EMAIL PROTECTED]> wrote: >> Ben Finney <[EMAIL PROTECTED]> (BF) wrote: > >>BF> The latter two statements are equivalent. The >>'instance.method(args)' BF> syntax is just sugar for >>'Class.method(instance, args)'. > > It is more than just syntactic sugar because the Class

Re: Python 3K or Python 2.9?

2007-09-14 Thread Bjoern Schliessmann
Terry Reedy wrote: > No it does not. The method wrapping is done at runtine. The > compiler is ignorant of the wrapping that will be done. Agreed, after reading the docs. dis.dis(f) > 1 0 LOAD_GLOBAL 0 (c) > 3 LOAD_ATTR1 (meth) >

Re: Python 3K or Python 2.9?

2007-09-14 Thread Bjoern Schliessmann
Bruno Desthuilliers wrote: > A method is a thin wrapper around a function, usually instanciated > and returned by the __get__ method [1] of the function itself when > the function is looked up as an attribute of a class or an > instance: > [...] That's interesting, thank you for the explanation.

Re: Python 3K or Python 2.9?

2007-09-14 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : > Bruno Desthuilliers wrote: >> Bjoern Schliessmann a écrit : > >>> Why don't you make a preprocessor which accepts method >>> declarations without "self" and fixes them? >> The problem being that there's no such thing as a "method >> declaration" in Python > > Yep,

Re: Python 3K or Python 2.9?

2007-09-13 Thread Terry Reedy
"Bjoern Schliessmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> - only functions being attributes of a class... |What, IYHO, is the difference between a method and a function? A method is a function accessed as an attribute of a class or instance. As an object type, it is a

Re: Python 3K or Python 2.9?

2007-09-13 Thread TheFlyingDutchman
> If you look at the thread "parameter list notation" from ten days or so > ago, TheFlyingDutchman has forked Python and is working on a very special > new language, PIEthun 3.01B. > I for one am looking forward to seeing all > the very special features of PIEthun. It will be named PIEthun 3000 as

Re: Python 3K or Python 2.9?

2007-09-13 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Chris Mellon <[EMAIL PROTECTED]> wrote: >> >> and I'll punch a kitten before I accept having to read >> Python code guessing if something is a global, a local, or part of >> self like I do in C++. > >Exactly: the technical o

Re: Python 3K or Python 2.9?

2007-09-13 Thread Aahz
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > >Specifically an easier way of doing it provided by the language syntax >(hence "syntactic sugar"). As in, "the form 'foo += 1' is syntactic >sugar for 'foo = foo + 1'". Except, of course, that it isn't, quite. ;-) -- Aahz

Re: Python 3K or Python 2.9?

2007-09-13 Thread Steven D'Aprano
On Thu, 13 Sep 2007 20:59:06 +0200, Bjoern Schliessmann wrote: > TheFlyingDutchman wrote: >> Here's a FAQ item where they refer to it as I think Python should have >> done it - a special predefined variable: > > Maybe. Personally, I like it the way it is in Python. > > Why don't you make a prepr

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bjoern Schliessmann
Bruno Desthuilliers wrote: > Bjoern Schliessmann a écrit : >> Why don't you make a preprocessor which accepts method >> declarations without "self" and fixes them? > > The problem being that there's no such thing as a "method > declaration" in Python Yep, there are only definitions. I'm sorry.

Re: Python 3K or Python 2.9?

2007-09-13 Thread Terry Reedy
"TheFlyingDutchman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Here's a FAQ item where they refer to it as I think Python should have | done it - a special predefined variable: | | http://www.faqs.org/docs/javap/c5/s5.html | | "Java provides a special, predefined variable named

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : > TheFlyingDutchman wrote: > >>Here's a FAQ item where they refer to it as I think Python should >>have done it - a special predefined variable: > > > Maybe. Personally, I like it the way it is in Python. > > Why don't you make a preprocessor which accepts method d

Re: Python 3K or Python 2.9?

2007-09-13 Thread Wildemar Wildenburger
TheFlyingDutchman wrote: >> (Can you tell I'm currently forced to developing in Java? ;) (Which I'm >> currently avoiding to do, by wasting my time on usenet.)) >> > > Maybe you can sneak Jython into the mix. Just describe it as "this > Java scripting language". > > Hehe, devious idea. I might j

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bjoern Schliessmann
TheFlyingDutchman wrote: > Here's a FAQ item where they refer to it as I think Python should > have done it - a special predefined variable: Maybe. Personally, I like it the way it is in Python. Why don't you make a preprocessor which accepts method declarations without "self" and fixes them? Re

Re: Python 3K or Python 2.9?

2007-09-13 Thread TheFlyingDutchman
> > (Can you tell I'm currently forced to developing in Java? ;) (Which I'm > currently avoiding to do, by wasting my time on usenet.)) > Maybe you can sneak Jython into the mix. Just describe it as "this Java scripting language". -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : > Well I'm with Bruce Eckel - there shouldn't be any argument for the > object in the class method parameter list. def fun(obj, *args, **kw): # generic code here that do something with obj import some_module some_module.SomeClass.fun = fun This is why uniformity is

Re: Python 3K or Python 2.9?

2007-09-13 Thread Marc 'BlackJack' Rintsch
On Thu, 13 Sep 2007 10:10:57 -0700, TheFlyingDutchman wrote: >> Isn't one of the main ideas behind python that it doesn't force you to >> do (well, declare) anything? And by "ideas" I mean "design decisions". >> Thats exactly what makes python great for prototyping; you just do it >> and see if it

Re: Python 3K or Python 2.9?

2007-09-13 Thread Stefan Bellon
On Thu, 13 Sep, TheFlyingDutchman wrote: > Bruce said that no other mainstream OO language is explicitly passing > the object as a parameter to class methods. Ada 95 does. And Ada 95 was the first standardized OO language. Now with Ada 2005 you can either pass the the object explicitly as first p

Re: Python 3K or Python 2.9?

2007-09-13 Thread TheFlyingDutchman
> > Isn't one of the main ideas behind python that it doesn't force you to > do (well, declare) anything? And by "ideas" I mean "design decisions". > Thats exactly what makes python great for prototyping; you just do it > and see if it works. As soon as you need to declare things you have to > cha

Re: Python 3K or Python 2.9?

2007-09-13 Thread Wildemar Wildenburger
TheFlyingDutchman wrote: > What I would like to have seen added to class definitions was the > forced declaration of all object variables in the class outside of > methods. I don't like the fact that they have to be, and can be > created in any method on the fly. > Isn't one of the main ideas behi

Re: Python 3K or Python 2.9?

2007-09-13 Thread TheFlyingDutchman
> > > Here is a link to a tutorial where Sun is talking about the this > > reference: > >http://java.sun.com/docs/books/tutorial/java/javaOO/thiskey.html > > That's a tutorial for getting you started, no reference > documentation or in-depth course. > Here's a FAQ item where they refer to it as I

Re: Python 3K or Python 2.9?

2007-09-13 Thread TheFlyingDutchman
Well I'm with Bruce Eckel - there shouldn't be any argument for the object in the class method parameter list. But since Python 3 was "code-named" 3000 (implying but not delivering big changes... I don't think it required big changes) and since it still has an explicit object parameter it's a given

Re: Python 3K or Python 2.9?

2007-09-13 Thread Alex Martelli
TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > >>> Foo.bar(foo, "spam") > > >>> foo.bar("spam") > > That looks like a case of "There's more than one way to do it". ;) > The first form is definitely consistent with the > method declaration, so there's a lot to be said for using that styl

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bjoern Schliessmann
TheFlyingDutchman wrote: > I am not talking about how the implementation of a C++ or Java > compiler uses the this pointer/this reference internally. I am > talking about how an author describes in English the "this" > pointer/reference in their book on programming C++ or Java. Ah, okay. > I do

Re: Python 3K or Python 2.9?

2007-09-13 Thread Piet van Oostrum
> Ben Finney <[EMAIL PROTECTED]> (BF) wrote: >BF> The latter two statements are equivalent. The 'instance.method(args)' >BF> syntax is just sugar for 'Class.method(instance, args)'. It is more than just syntactic sugar because the Class is derived from the instance at runtime. -- Piet van O

Re: Python 3K or Python 2.9?

2007-09-13 Thread Piet van Oostrum
> TheFlyingDutchman <[EMAIL PROTECTED]> (T) wrote: >T> The confusing way about the current Python method when you first >T> encounter it is >T> why is "self" being passed in when you write the function but not >T> when you call it. It *is* passed when you call it, but it is written before t

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : >> >>> Foo.bar(foo, "spam") >> >>> foo.bar("spam") > > That looks like a case of "There's more than one way to do it". ;) Nope, on the contrary. The nice thing with this model is that you don't have distinct rules for functions and methods, since methods are j

Re: Python 3K or Python 2.9?

2007-09-13 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : > On Sep 12, 4:40 am, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: >> Ivan Voras wrote: >>> What does "self" have to do with an object model? It's an >>> function/method argument that might as well be hidden in the >>> compiler without ever touching the role it has (if

Re: Python 3K or Python 2.9?

2007-09-12 Thread Ben Finney
TheFlyingDutchman <[EMAIL PROTECTED]> writes: (Please, preserve attribution lines so it's clear who wrote what in your quoted material.) > > >>> Foo.bar(foo, "spam") > > >>> foo.bar("spam") > > That looks like a case of "There's more than one way to do it". ;) Indeed, but there's only o

Re: Python 3K or Python 2.9?

2007-09-12 Thread Steven D'Aprano
On Wed, 12 Sep 2007 19:40:04 -0700, TheFlyingDutchman wrote: >> >>> Foo.bar(foo, "spam") >> >>> foo.bar("spam") > > That looks like a case of "There's more than one way to do it". ;) The > first form is definitely consistent with the method declaration, so > there's a lot to be said for u

Re: Python 3K or Python 2.9?

2007-09-12 Thread TheFlyingDutchman
> >>> Foo.bar(foo, "spam") > >>> foo.bar("spam") That looks like a case of "There's more than one way to do it". ;) The first form is definitely consistent with the method declaration, so there's a lot to be said for using that style when teaching people to make classes -> send self, rece

Re: Python 3K or Python 2.9?

2007-09-12 Thread Ben Finney
"Peter Decker" <[EMAIL PROTECTED]> writes: > On 9/12/07, Ben Finney <[EMAIL PROTECTED]> wrote: > > How is that preferable to the magic of "instance is passed as the > > first argument to a method"? > > So everything that isn't passed explicitly is "magic"? No. Everything that's not explicit is "

Re: Python 3K or Python 2.9?

2007-09-12 Thread Ben Finney
TheFlyingDutchman <[EMAIL PROTECTED]> writes: > I would mention that an instance is passed as the first parameter > argument of a method if the methods were declared with the extra > argument and called with the extra argument: > > a = MyClass() > > my_method(a,someParameter) Are you unaware th

Re: Python 3K or Python 2.9?

2007-09-12 Thread Peter Decker
On 9/12/07, Ben Finney <[EMAIL PROTECTED]> wrote: > TheFlyingDutchman <[EMAIL PROTECTED]> writes: > > > I am talking about how an author describes in English the "this" > > pointer/reference in their book on programming C++ or Java. > > > > I don't think you will find them saying that under the cov

Re: Python 3K or Python 2.9?

2007-09-12 Thread TheFlyingDutchman
On Sep 12, 5:47 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > TheFlyingDutchman <[EMAIL PROTECTED]> writes: > > I am talking about how an author describes in English the "this" > > pointer/reference in their book on programming C++ or Java. > > > I don't think you will find them saying that under the

Re: Python 3K or Python 2.9?

2007-09-12 Thread Ben Finney
TheFlyingDutchman <[EMAIL PROTECTED]> writes: > I am talking about how an author describes in English the "this" > pointer/reference in their book on programming C++ or Java. > > I don't think you will find them saying that under the covers "this" > was passed to the method (if in fact it is). Th

Re: Python 3K or Python 2.9?

2007-09-12 Thread TheFlyingDutchman
On Sep 12, 3:53 pm, Bjoern Schliessmann wrote: > TheFlyingDutchman wrote: > > In C++ and Java I don't believe "this" is ever referred to as an > > implicit function parameter. > > Oh yes, it is. All methods use it as a base address into instances. > Implicitly though. I am not talking about how t

Re: Python 3K or Python 2.9?

2007-09-12 Thread Bjoern Schliessmann
Stefan Behnel wrote: > Bjoern Schliessmann wrote: >> If this was needless, why do C++ and Java have the "this" >> pointer? > > Be careful when you use the word "needless" in the context of > Java. Umm, why? I didn't introduce it. Regards, Björn -- BOFH excuse #8: static buildup -- http:

Re: Python 3K or Python 2.9?

2007-09-12 Thread Bjoern Schliessmann
TheFlyingDutchman wrote: > In C++ and Java I don't believe "this" is ever referred to as an > implicit function parameter. Oh yes, it is. All methods use it as a base address into instances. Implicitly though. > It is a (sometimes necessary) way to reference the object inside > one if it's meth

Re: Python 3K or Python 2.9?

2007-09-12 Thread TheFlyingDutchman
> > "this" in C++ and Java is not shown in the parameter list, which was > what he was > complaining about. He wants > > class MyClass: > def SomeFunction(someParameter): >self.someParameter = someParameter > > not > > class MyClass: > def SomeFunction(self, someParame

Re: Python 3K or Python 2.9?

2007-09-12 Thread TheFlyingDutchman
On Sep 12, 4:40 am, Bjoern Schliessmann wrote: > Ivan Voras wrote: > > What does "self" have to do with an object model? It's an > > function/method argument that might as well be hidden in the > > compiler without ever touching the role it has (if not, why?). I > > agree that it's needless noise

Re: Python 3K or Python 2.9?

2007-09-12 Thread Alex Martelli
Chris Mellon <[EMAIL PROTECTED]> wrote: ... > > Actually you could do the "magic first-parameter insertion" just when > > returning a bound or unbound method object in the function's __get__ > > special method, and that would cover all of the technical issues you ... > This would mean that mi

Re: Python 3K or Python 2.9?

2007-09-12 Thread Chris Mellon
On 9/12/07, Alex Martelli <[EMAIL PROTECTED]> wrote: > Duncan Booth <[EMAIL PROTECTED]> wrote: >... > > As for omitting 'self' from method definitions, at first site you might > > think the compiler could just decide that any 'def' directly inside a > > class could silently insert 'self' as an

Re: Python 3K or Python 2.9?

2007-09-12 Thread Alex Martelli
Duncan Booth <[EMAIL PROTECTED]> wrote: ... > As for omitting 'self' from method definitions, at first site you might > think the compiler could just decide that any 'def' directly inside a > class could silently insert 'self' as an additional argument. This > doesn't work though because not ev

Re: Python 3K or Python 2.9?

2007-09-12 Thread Duncan Booth
Ivan Voras <[EMAIL PROTECTED]> wrote: >> I'd say Mr Eckel fails to graps some of the great points about Python's > >> object model - the rant about the use of 'self' is a sure clue. > > What does "self" have to do with an object model? It's an > function/method argument that might as well be

Re: Python 3K or Python 2.9?

2007-09-12 Thread Stefan Behnel
Bjoern Schliessmann wrote: >> What does "self" have to do with an object model? It's an >> function/method argument that might as well be hidden in the >> compiler without ever touching the role it has (if not, why?). I >> agree that it's needless noise in a language. > > If this was needless, why

Re: Python 3K or Python 2.9?

2007-09-12 Thread Bjoern Schliessmann
Ivan Voras wrote: > What does "self" have to do with an object model? It's an > function/method argument that might as well be hidden in the > compiler without ever touching the role it has (if not, why?). I > agree that it's needless noise in a language. If this was needless, why do C++ and Java

Re: Python 3K or Python 2.9?

2007-09-12 Thread Ivan Voras
Bruno Desthuilliers wrote: TheFlyingDutchman a écrit : Python user and advocate Bruce Eckel is disappointed with the additions (or lack of additions) in Python 3: http://www.artima.com/weblogs/viewpost.jsp?thread=214112 I'd say Mr Eckel fails to graps some of the great points about Python's

Re: Python 3K or Python 2.9?

2007-09-12 Thread Bruno Desthuilliers
TheFlyingDutchman a écrit : > Python user and advocate Bruce Eckel is disappointed with the > additions (or lack of additions) in Python 3: > > http://www.artima.com/weblogs/viewpost.jsp?thread=214112 > I'd say Mr Eckel fails to graps some of the great points about Python's object model - the r

Re: Python 3K or Python 2.9?

2007-09-11 Thread Graham Dumpleton
On Sep 12, 2:14 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Paul Rubin writes: > > TheFlyingDutchman <[EMAIL PROTECTED]> writes: > > > Python user and advocate Bruce Eckel is disappointed with the > > > additions (or lack of additions) in Python 3: > > > >http://www.artim

Re: Python 3K or Python 2.9?

2007-09-11 Thread Ben Finney
Paul Rubin writes: > TheFlyingDutchman <[EMAIL PROTECTED]> writes: > > Python user and advocate Bruce Eckel is disappointed with the > > additions (or lack of additions) in Python 3: > > > > http://www.artima.com/weblogs/viewpost.jsp?thread=214112 > > That article is p

Re: Python 3K or Python 2.9?

2007-09-11 Thread Paul Rubin
TheFlyingDutchman <[EMAIL PROTECTED]> writes: > Python user and advocate Bruce Eckel is disappointed with the > additions (or lack of additions) in Python 3: > > http://www.artima.com/weblogs/viewpost.jsp?thread=214112 That article is pretty weak. -- http://mail.python.org/mailman/listinfo/pytho