In article mailman.555.1268232321.23598.python-l...@python.org,
John Posner jjpos...@optimum.net wrote:
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
Aahz wrote:
In article mailman.555.1268232321.23598.python-l...@python.org,
John Posner jjpos...@optimum.net wrote:
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
a...@pythoncraft.com (Aahz) writes:
In article mailman.555.1268232321.23598.python-l...@python.org,
John Posner jjpos...@optimum.net wrote:
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python
On 3/21/2010 5:34 PM, Aahz wrote:
In articlemailman.555.1268232321.23598.python-l...@python.org,
John Posnerjjpos...@optimum.net wrote:
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
On 3/10/2010 8:37 PM, Gabriel Genellina wrote:
En Wed, 10 Mar 2010 11:45:38 -0300, John Posner jjpos...@optimum.net
escribió:
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
[ cross-posting to edu-sig ]
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
http://www.jjposner.net/media/python-properties-0310.pdf
I'm interested in corrections, of course. But I'm
On Wed, Mar 10, 2010 at 09:45, John Posner jjpos...@optimum.net wrote:
[ cross-posting to edu-sig ]
Bruno (and anyone else interested) --
As I promised/threatened, here's the *start* of a write-up on properties,
aimed at non-advanced Python programmers:
En Wed, 10 Mar 2010 11:45:38 -0300, John Posner jjpos...@optimum.net
escribió:
As I promised/threatened, here's the *start* of a write-up on
properties, aimed at non-advanced Python programmers:
http://www.jjposner.net/media/python-properties-0310.pdf
I'd use 'function' instead of
John Posner a écrit :
On 3/3/2010 6:56 PM, John Posner wrote:
... I was thinking
today about doing a Bruno, and producing similar pieces on:
* properties created with the @property decorator
* the descriptor protocol
I'll try to produce something over the next couple of days.
Starting to
On 3/5/2010 7:15 AM, Bruno Desthuilliers wrote:
John Posner a écrit :
On 3/3/2010 6:56 PM, John Posner wrote:
... I was thinking
today about doing a Bruno, and producing similar pieces on:
* properties created with the @property decorator
* the descriptor protocol
I'll try to produce
Eike Welk a écrit :
Bruno Desthuilliers wrote:
John Posner a écrit :
Done -- see http://wiki.python.org/moin/FromFunctionToMethod
Done and well done !-)
Thanks again for the good job John.
I like it too, thanks to both of you!
I have two small ideas for improvement:
- Swap the first two
On 3/4/2010 5:59 AM, Bruno Desthuilliers wrote:
I have two small ideas for improvement: - Swap the first two
paragraphs. First say what it is, and then give the motivation.
Mmm... As far as I'm concerned, I like it the way its. John ?
I think it doesn't make very much difference. But in the
On 3/3/2010 6:56 PM, John Posner wrote:
... I was thinking
today about doing a Bruno, and producing similar pieces on:
* properties created with the @property decorator
* the descriptor protocol
I'll try to produce something over the next couple of days.
Starting to think about a writeup
Eike Welk a écrit :
John Posner wrote:
I've updated the text at this location:
http://cl1p.net/bruno_0301.rst/
I think this is a very useful writeup!
It would be perfect with a little bit of introduction that says:
1. - What it is: The rough details of method look-up;
2. - which
On 3/3/2010 5:56 AM, Bruno Desthuilliers wrote:
Eike Welk a écrit :
John Posner wrote:
I've updated the text at this location:
http://cl1p.net/bruno_0301.rst/
I think this is a very useful writeup!
It would be perfect with a little bit of introduction that says:
1. - What it is: The rough
John Posner a écrit :
On 3/3/2010 5:56 AM, Bruno Desthuilliers wrote:
Eike Welk a écrit :
John Posner wrote:
I've updated the text at this location:
http://cl1p.net/bruno_0301.rst/
I think this is a very useful writeup!
It would be perfect with a little bit of introduction that says:
1. -
On 3/3/2010 9:58 AM, John Posner wrote:
Film at 11,
John
Done -- see http://wiki.python.org/moin/FromFunctionToMethod
-John
--
http://mail.python.org/mailman/listinfo/python-list
On 3/3/2010 10:48 AM, Bruno Desthuilliers wrote:
I spotted this:
http://www.python.org/doc/faq/programming/#what-is-a-method
http://www.python.org/doc/faq/general/#why-must-self-be-used-explicitly-in-method-definitions-and-calls
Our text is probably a bit too long for a direct inclusion in
John Posner a écrit :
On 3/3/2010 9:58 AM, John Posner wrote:
Film at 11,
John
Done -- see http://wiki.python.org/moin/FromFunctionToMethod
Done and well done !-)
Thanks again for the good job John.
PS : Do you think it could be possible to add link to this page from the
relevant FAQ
Bruno Desthuilliers wrote:
John Posner a écrit :
Done -- see http://wiki.python.org/moin/FromFunctionToMethod
Done and well done !-)
Thanks again for the good job John.
I like it too, thanks to both of you!
I have two small ideas for improvement:
- Swap the first two paragraphs. First say
On 3/3/2010 6:33 PM, Eike Welk wrote:
I have two small ideas for improvement:
- Swap the first two paragraphs. First say what it is, and then give the
motivation.
No problem -- since this is a Wiki, you can perform the swap yourself!
(If you haven't done it in a day or so, I'll do the deed.)
John Posner a écrit :
On 3/1/2010 2:59 PM, Bruno Desthuilliers wrote:
Answer here:
http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/bd71264b6022765c/3a77541bf9d6617d#doc_89d608d0854dada0
I really have to put this in the wiki :-/
Bruno, I performed a light
On 3/2/2010 3:57 AM, Bruno Desthuilliers wrote:
With the instance object (if any) and class object available,
it's easy to create a method object that wraps the function object.
That's perfect.
Fixed.
But there's also a typo to fix in the Python implementation of the
Method object: in
John Posner wrote:
I've updated the text at this location:
http://cl1p.net/bruno_0301.rst/
I think this is a very useful writeup!
It would be perfect with a little bit of introduction that says:
1. - What it is: The rough details of method look-up;
2. - which contains some of the
Michael Rudolf a écrit :
Out of curiosity I tried this and it actually worked as expected:
class T(object):
x=[]
foo=x.append
def f(self):
return self.x
t=T()
t.f()
[]
T.foo(1)
t.f()
[1]
At first I thought hehe, always fun to play around with python.
On 3/1/2010 2:59 PM, Bruno Desthuilliers wrote:
Answer here:
http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/bd71264b6022765c/3a77541bf9d6617d#doc_89d608d0854dada0
I really have to put this in the wiki :-/
Bruno, I performed a light copy-edit of your writeup and put
Out of curiosity I tried this and it actually worked as expected:
class T(object):
x=[]
foo=x.append
def f(self):
return self.x
t=T()
t.f()
[]
T.foo(1)
t.f()
[1]
At first I thought hehe, always fun to play around with python. Might
be
* Michael Rudolf:
Out of curiosity I tried this and it actually worked as expected:
class T(object):
x=[]
foo=x.append
def f(self):
return self.x
t=T()
t.f()
[]
T.foo(1)
t.f()
[1]
At first I thought hehe, always fun to play around with python. Might
be
Michael Rudolf wrote in news:hmdo3m$28...@news.urz.uni-heidelberg.de in
comp.lang.python:
Note that all I did was moving the list and foo into the instance. Still
no self and no cls, but also no static behaviour any more.
Yes in the first case foo was an attribute of the class, and in the
Am 28.02.2010 15:08, schrieb Alf P. Steinbach:
Hello.upper
built-in method upper of str object at 0x00BA16E0
f = Hello.upper
f
built-in method upper of str object at 0x00BA16E0
f()
'HELLO'
f.__self__
'Hello'
Holy hand grenade.
You have no Idea how enlightened I feel right
30 matches
Mail list logo