-*ε*
Admittedly a tough call. I see the attraction of the proposed syntax.
Maybe somewhat more readable since the declaration syntax matches the
usage syntax, which is nice. I think it would have been superior to the
current syntax if it had been done that way in the first place. However,
On Dec 8, 6:43 pm, william tanksley [EMAIL PROTECTED] wrote:
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
snip
I see a lot of people are against it; I admit that it's not
william tanksley a écrit :
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
I think it's an awesome proposal. It's about time! With this change,
defining methods uses the same
[EMAIL PROTECTED] wrote:
On Dec 6, 4:15 pm, Carl Banks [EMAIL PROTECTED] wrote:
[...]
This brings up another question, what would one use when referencing
method names inside the class definition?:
class C:
def self.method(arg):
self.value = arg
def
On Dec 6, 10:15 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not
On Mon, 08 Dec 2008 20:55:16 +, Arnaud Delobelle wrote:
[EMAIL PROTECTED] writes:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
Or, after the class definition is done, to extend it dynamically:
def C.method(self, arg):
self.value =
On Sun, 07 Dec 2008 18:27:21 +0100, Andreas Waldenburger wrote:
On Sat, 6 Dec 2008 23:21:04 -0800 (PST) Lie [EMAIL PROTECTED] wrote:
I think we have to test this on newbies. [snip]
Now that's talking like a programmer!
Ideas on how such a survey could be conducted? Anyone?
If this
Philip Slate a écrit :
On Dec 7, 1:13 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
and friendlier to newbies.
I'd rather say more acceptable to java-brainwashed developpers.
And I'd rather say you're trolling,
Almost, indeed. But not as much as you !-)
--
I like the transparancy and clearity of python, and the explicit self
fits beautifully. Allowing a second way of defining your methods
would only confuse newbies more I would think.
I was a newby only half a year ago (or maybe I still am). The
explicit self seems weird the very first time you see
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
I don't really see any advantage. IMHO, it is not clearer, it is not
more concise, it makes the definition of class shared variables look
really out of place. It also makes the new programmer
On Dec 6, 4:15 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 6, 12:47 am, Patrick Mullen [EMAIL PROTECTED] wrote:
Could I do something like this:
def a.add(b): return a+b
Outside of a class? Of course then that makes you think you could do
5.add(6) or something crzy like that.
On Dec 6, 4:15 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 6, 12:47 am, Patrick Mullen [EMAIL PROTECTED] wrote:
Could I do something like this:
def a.add(b): return a+b
Outside of a class? Of course then that makes you think you could do
5.add(6) or something crzy like that.
On Dec 8, 12:01 pm, [EMAIL PROTECTED] wrote:
It would be nice to be able to do the following instead:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
The above example should have read as follows:
class C:
def createfunc(self, arg):
On Dec 8, 2008, at 11:59 AM, [EMAIL PROTECTED] wrote:
On Dec 6, 4:15 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 6, 12:47 am, Patrick Mullen [EMAIL PROTECTED] wrote:
Could I do something like this:
def a.add(b): return a+b
Outside of a class? Of course then that makes you think
On Dec 7, 4:23 pm, Philip Slate [EMAIL PROTECTED] wrote:
On Dec 7, 1:13 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
and friendlier to newbies.
I'd rather say more acceptable to java-brainwashed developpers.
And I'd rather say you're trolling, but that's ok since you're
preaching
[EMAIL PROTECTED] writes:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
Or, after the class definition is done, to extend it dynamically:
def C.method(self, arg):
self.value = arg
...which would be the equivalent of the following:
def
On Mon, Dec 8, 2008 at 12:55 PM, Arnaud Delobelle
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
Or, after the class definition is done, to extend it dynamically:
def C.method(self, arg):
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Aaron Brady
Sent: Monday, December 08, 2008 3:27 PM
To: python-list@python.org
Subject: Re: Guido's new method definition idea
On Dec 7, 4:23 pm, Philip Slate [EMAIL PROTECTED] wrote
On Dec 8, 2:55 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
Or, after the class definition is done, to extend it dynamically:
def C.method(self, arg):
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
I think it's an awesome proposal. It's about time! With this change,
defining methods uses the same special syntax hack that calling
[EMAIL PROTECTED] wrote:
On another related note, I would be interested in seeing this syntax
adopted for a different purpose...
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
I agree -- this would be a much better use of the syntax,
and I'd like to
I'm a huge -1 on this, it adds nothing to the language, and IMO
violates quite a few Zens.
-Beautiful is better than ugly.
A bit subjective, but this is ugly IMO.
-Special cases aren't special enough to break the rules.
-There should be one-- and preferably only one --obvious way to do it.
--
Sorry Dennis,
I don't understand your answer.
I'm not very knowledgable with all the OO vocabulary, but just use OO.
self.a , self.b , self.c are stored in the object and could later be
used by other object-methods.
like
def print_a_b_c(self):
print self,a,self.b,self.c
the name
Lie wrote:
On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote:
What would be interesting would be some syntactical sugar to get rid of
the 'self' (at least in the code body).
example:
class C:
class_elements a,b,c,d
def method(self,arg):
global d
a,b,c =
On Sun, 07 Dec 2008 12:43:13 +0100, News123 wrote:
Sorry Dennis,
I don't understand your answer.
I'm not very knowledgable with all the OO vocabulary, but just use OO.
self.a , self.b , self.c are stored in the object and could later be
used by other object-methods.
In Python
Erik Max Francis [EMAIL PROTECTED] writes:
[about removing self]
P.S. You're beating a long-dead horse here; your precise proposal has
been brought up countless times on comp.lang.python and shot down
every single time for the same reason. It isn't going to happen.
I guess it's part of the
On Sun, 07 Dec 2008 02:49:27 -0500 acerimusdux
[EMAIL PROTECTED] wrote:
I'm not sure though whether allowing both syntaxes would make things
more or less confusing. It might actually be helpful in some respects
for newcomers to realize that self.method(arg) is somewhat the same
as
On Sat, 6 Dec 2008 23:21:04 -0800 (PST) Lie [EMAIL PROTECTED] wrote:
I think we have to test this on newbies. [snip]
Now that's talking like a programmer!
Ideas on how such a survey could be conducted? Anyone?
If this dead horse is revived because of that reason, then I'd go with
changing
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
possibility since it
Daniel Fetchinson a écrit :
(snip)
It doesn't add anything but makes something that exists a bit clearer
Err... I fail to see how magically transforming def self.foo(...) into
def foo(self, ...) makes anything clearer about what really happens and
how Python's object model works.
and
On Sun, 07 Dec 2008 19:13:18 +0100 Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
and friendlier to newbies.
I'd rather say more acceptable to java-brainwashed developpers.
Why would you rather be unfriendly and seed ambivalence? I do see the
fun in a little Python snobbism, but ... come on.
News123 a écrit :
Lie wrote:
On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote:
What would be interesting would be some syntactical sugar to get rid of
the 'self' (at least in the code body).
This has been debated to hell and back. And it's *not* going to happen.
example:
class C:
Daniel Fetchinson a écrit :
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
possibility since it maintains
Daniel Fetchinson a écrit :
(snip)
Still, improved error messages would be desirable (concerning the
number of arguments passed to an instance method).
Then count me as +2 on this !-)
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
Daniel Fetchinson a écrit :
(snip)
It doesn't add anything but makes something that exists a bit clearer
Err... I fail to see how magically transforming def self.foo(...) into
def foo(self, ...) makes anything clearer about what really happens and
how Python's
On Dec 5, 2008, at 21:21 , Daniel Fetchinson wrote:
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
self.value = arg
return self.value
I have
On Sat, 06 Dec 2008 16:34:56 -0800, Erik Max Francis wrote:
`$` as a shortcut for self, on the other hand, gives absolutely no
mnemonic indication what it stands for, and users would be simply left
guessing.
However, $ is sometimes used as an alternative way of writing S̸ (I've
attempted to
On Sun, 07 Dec 2008 20:56:40 GMT I V [EMAIL PROTECTED] wrote:
So, if we want Python to the programming language of choice for
Lacanian psychoanalysts, perhaps we should adopt the symbol $ (or
even, with Python 3's support for unicode identifiers, S followed by
U+0388) instead of self.
OK, I'm
On Dec 7, 1:13 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
and friendlier to newbies.
I'd rather say more acceptable to java-brainwashed developpers.
And I'd rather say you're trolling, but that's ok since you're
preaching to the converted. You conveniently forgot to mention the C++/
On Sun, 07 Dec 2008 20:56:40 +, I V wrote:
So, if we want Python to the programming language of choice for Lacanian
psychoanalysts, perhaps we should adopt the symbol $ (or even, with
Python 3's support for unicode identifiers, S followed by U+0388)
instead of self.
Is that supposed to
On Sun, 07 Dec 2008 12:57:27 +0100, News123 wrote:
Lie wrote:
On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote:
What would be interesting would be some syntactical sugar to get rid
of the 'self' (at least in the code body).
example:
class C:
class_elements a,b,c,d
def
Steven D'Aprano wrote:
On Fri, 05 Dec 2008 20:35:07 -0800, James Stroud wrote:
Daniel Fetchinson wrote:
I'd like this new way of defining methods, what do you guys think?
Consider the maverick who insists on
class C:
def me.method(arg):
self.value = arg
Replace self with me.
try this:
import this
and look at the 15th line...
I agree that for newcomers to Python, the class method definition might
seem strange. I certainly had problems with it when starting with
Python, coming from Java. But in the meantime it feels right. I don't
know if it is because I'm used to
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't have anything against these languages, but there's a
reason I use Python).
Russ P.
On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote:
try this:
import this
and look at the 15th line...
The reason why I'm against that change too. It adds a second,
alternative way to express something that is already in the language.
I agree that for newcomers to Python, the
On 6 Dec 2008 09:18:20 GMT Marc 'BlackJack' Rintsch [EMAIL PROTECTED]
wrote:
On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote:
[snip reference to preferably only one way to do it]
The reason why I'm against that change too. It adds a second,
alternative way to express
Antoine De Groote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I think this (that is just sugar) may be a little better:
class C:
def method($, arg):
$value = arg
Or even this, combined with the
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently possible).
Ruby uses @ and @@ for similar purposes.
I agree that the code looks worse, but also shorter to read and
On Sat, 6 Dec 2008 13:32:58 +0100 Andreas Waldenburger
[EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED]
suggested:
class C:
def $method(arg):
$value = arg
[snip]
[snip]
self is a speaking identifier, $ isn't.
Also, nothing
[EMAIL PROTECTED] wrote:
Antoine De Groote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I think this (that is just sugar) may be a little better:
class C:
def method($, arg):
$value = arg
Aaron Brady wrote:
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and
James Stroud jst...bi.ucla.edu wrote:
Consider the maverick who insists on
8example with me instead of self
What's the interpreter going to do with our maverick's code?
Took me a while, but after I remembered that a maverick
is an unmarked, wild member of the bovine species
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
On Dec 5, 7:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't have anything
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently possible).
Ruby uses @ and @@ for similar purposes.
On Dec 6, 4:37 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 13:32:58 +0100 Andreas Waldenburger
[EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED]
suggested:
class C:
def $method(arg):
$value = arg
[snip]
On Sat, 06 Dec 2008 07:15:27 -0800, Russ P. wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently
Daniel Fetchinson a écrit :
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is
Russ P. wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't
On Dec 6, 7:34 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Sat, 06 Dec 2008 07:15:27 -0800, Russ P. wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def
Steven D'Aprano:
If a line of code uses too many instance attributes to fit comfortably on
a line, spread it over two lines. There is no newline shortage, they are
a renewable resource.
Splitting lines is generally possible, but sometimes it's not I want,
for example to keep a formula whole.
Bad idea having two ways to do this. Pick one or the other!
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 6, 2008, at 11:42 AM, [EMAIL PROTECTED] wrote:
class ThisIsAClass:
def $some_method(arg1, arg2):
$value = arg1 + $foo + $bar + $baz * arg2
...
I think my biggest problem with this is what got me off Perl.
Add $, together with already used @ and maybe some other
identifiers
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python
Daniel Fetchinson wrote:
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
self.value = arg
return self.value
Hmm,
I'd give the proposal a
Neal Becker wrote:
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future
On Dec 6, 12:47 am, Patrick Mullen [EMAIL PROTECTED] wrote:
Could I do something like this:
def a.add(b): return a+b
Outside of a class? Of course then that makes you think you could do
5.add(6) or something crzy like that. (I mean, you can do
(5).__add__(6) but that's something else
On Dec 6, 9:15 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not
On Dec 6, 9:12 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
possibility since it
Bad idea having two ways to do this. Pick one or the other!
Maybe only this alternative syntax for python 4000?
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
possibility since it
On Sat, Dec 6, 2008 at 1:33 PM, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that
On Dec 6, 1:21 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 6, 9:12 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
On Sat, Dec 6, 2008 at 4:51 PM, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and
On Sat, 6 Dec 2008 14:39:34 -0800 (PST) Russ P.
[EMAIL PROTECTED] wrote:
I don't know much about Perl, but my understanding is that a dollar
sign must be used every time a variable is dereferenced, as in bash or
other shell languages. What we are proposing here is something
entirely
On Sat, 06 Dec 2008 08:01:40 -0800, Russ P. wrote:
-2 on this proposal.
Did you get two votes in the Presidential election too? 8^)
You know, occasionally you stumble across people on the Internet who
aren't from the USA. Some of us even speak English almost as good as
native speakers
On Dec 6, 4:39 pm, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 1:21 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Dec 6, 9:12 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new
Russ P. wrote:
Python already uses shorthand extensively. How about def? For people
who are so worried about self-explanatory symbols, what the heck does
that stand for? Default? Defeat? Defect? Defunct? Defer?
That's pretty silly; it's pretty obvious that `def` means define, and
even if
Russ P. wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
But that is not the way Python is meant to work. There are several
tennets in the Zen of Python that don't chime well with this approach.
self is a speaking identifier, $ isn't.
Is @ a speaking identifier? How
But it's ugly. No amount of rationalization will make it not ugly.
The dollar sign is ugly? I beg to differ.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 06 Dec 2008 21:51:51 -, Daniel Fetchinson
[EMAIL PROTECTED] wrote:
Did you read the blog post? The advantage is having a less confusing
situation for newbies (confusing the number of arguments to a method
call).
Experience suggests that newbies don't find this confusing, or at
Erik Max Francis:
your precise proposal has
been brought up countless times on comp.lang.python
And something tells me that it will keep coming up many more times in
the following years too.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Dec 5, 2008 at 9:21 PM, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
self.value = arg
return
On Dec 6, 6:42 pm, Russ P. [EMAIL PROTECTED] wrote:
But it's ugly. No amount of rationalization will make it not ugly.
The dollar sign is ugly? I beg to differ.
Nope, you're wrong.
Carl Banks
(See where this is going?)
--
http://mail.python.org/mailman/listinfo/python-list
On 06Dec2008 11:30, Andreas Waldenburger [EMAIL PROTECTED] wrote:
| On 6 Dec 2008 09:18:20 GMT Marc 'BlackJack' Rintsch [EMAIL PROTECTED]
| wrote:
| On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote:
| [snip reference to preferably only one way to do it]
|
| The reason why I'm
On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote:
What would be interesting would be some syntactical sugar to get rid of
the 'self' (at least in the code body).
example:
class C:
class_elements a,b,c,d
def method(self,arg):
global d
a,b,c = arg[0..3]
d
On Dec 6, 9:21 am, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
Russ P. wrote:
Python already uses shorthand extensively. How about def? For people
who are so worried about self-explanatory symbols, what the heck does
that stand for? Default? Defeat? Defect? Defunct? Defer?
I think the difference here is that those other abbreviations are
mostly
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
possibility since it
Daniel Fetchinson wrote:
http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.html
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
self.value
Of course I meant
class C:
def me.method(arg):
me.value = arg
James
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 05 Dec 2008 20:35:07 -0800, James Stroud wrote:
Daniel Fetchinson wrote:
http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-
stay.html
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead
Daniel Fetchinson wrote:
http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-
stay.html
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
On 6 Dez., 03:21, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
100 matches
Mail list logo