Re: how to use property?

2012-09-17 Thread Ian Kelly
On Mon, Sep 17, 2012 at 6:26 PM, MRAB wrote: > On 2012-09-18 00:46, Dave Angel wrote: >> An important difference from every other language I've used: The user >> of the attribute does not need to change his code when you decide it >> needs reimplementation as a property. >> >> In C++ and java, fo

Re: how to use property?

2012-09-17 Thread MRAB
On 2012-09-18 00:46, Dave Angel wrote: On 09/17/2012 07:34 PM, Terry Reedy wrote: On 9/17/2012 6:12 PM, Chris Angelico wrote: On Tue, Sep 18, 2012 at 7:55 AM, Fernando Jiménez wrote: Hi guys! I'm noob in python and I would know how to correctly use the property. I have read some things about

Re: how to use property?

2012-09-17 Thread Dave Angel
On 09/17/2012 07:34 PM, Terry Reedy wrote: > On 9/17/2012 6:12 PM, Chris Angelico wrote: >> On Tue, Sep 18, 2012 at 7:55 AM, Fernando Jiménez >> wrote: >>> Hi guys! >>> >>> I'm noob in python and I would know how to correctly use the >>> property. I >>> have read some things about it but I do not

Re: how to use property?

2012-09-17 Thread Terry Reedy
On 9/17/2012 6:12 PM, Chris Angelico wrote: On Tue, Sep 18, 2012 at 7:55 AM, Fernando Jiménez wrote: Hi guys! I'm noob in python and I would know how to correctly use the property. I have read some things about it but I do not quite understand. But I think it's a bad habit to use _ to change

Re: how to use property?

2012-09-17 Thread Chris Angelico
On Tue, Sep 18, 2012 at 7:55 AM, Fernando Jiménez wrote: > Hi guys! > > I'm noob in python and I would know how to correctly use the property. I > have read some things about it but I do not quite understand. > > But I think it's a bad habit to use _ to change the visibility of the > attributes as

Re: how to use property?

2012-09-17 Thread Dave Angel
On 09/17/2012 05:55 PM, Fernando Jiménez wrote: > Hi guys! > > I'm noob in python and I would know how to correctly use the property. I > have read some things about it but I do not quite understand. > > I found this: > > class C(object): > def __init__(self): > self._x = None > > @

how to use property?

2012-09-17 Thread Fernando Jiménez
Hi guys! I'm noob in python and I would know how to correctly use the property. I have read some things about it but I do not quite understand. I found this: class C(object): def __init__(self): self._x = None @property def x(self): """I'm the 'x' property."""

Re: how to use property

2005-02-25 Thread Kartic
[EMAIL PROTECTED] said the following on 2/25/2005 5:25 AM: (B> My question is how should I use "property" which wraps up (B> __get_channel() and __set_channel()in the following program. (B> I tried the program that written below, and it worked. Then I tried: (B> channel = property(__get_cha

Re: how to use property

2005-02-25 Thread dodoo
try this: self.channel = choice -- http://mail.python.org/mailman/listinfo/python-list

how to use property

2005-02-25 Thread neutrinman
My question is how should I use "property" which wraps up (B__get_channel() and __set_channel()in the following program. (BI tried the program that written below, and it worked. Then I tried: (Bchannel = property(__get_channel,__set_channel) as in comment 1, 2, (Band 3, (B (Bbut it genera