Kless wrote:
On 24 mayo, 12:27, Duncan Booth wrote:
Kless wrote:
Is there any way to simplify the next code? Because I'm setting a
variable by default of the same way than it's set in the setter.
---
class Foo(object):
def __init__(self, bar):
self._ba
On 24 mayo, 15:33, Kless wrote:
> On 24 mayo, 12:27, Duncan Booth wrote:
>
> > Kless wrote:
> > > Is there any way to simplify the next code? Because I'm setting a
> > > variable by default of the same way than it's set in the setter.
>
> > > ---
> > > class Foo(object):
> > >
On 24 mayo, 12:27, Duncan Booth wrote:
> Kless wrote:
> > Is there any way to simplify the next code? Because I'm setting a
> > variable by default of the same way than it's set in the setter.
>
> > ---
> > class Foo(object):
> > def __init__(self, bar):
> > self._bar = s
On Sun, 24 May 2009 19:03:26 +0600
Mike Kazantsev wrote:
> On Sun, 24 May 2009 05:06:13 -0700 (PDT)
> Kless wrote:
>
> > Is there any way to simplify the next code? Because I'm setting a
> > variable by default of the same way than it's set in the setter.
> >
> > ---
> > class
On Sun, 24 May 2009 05:06:13 -0700 (PDT)
Kless wrote:
> Is there any way to simplify the next code? Because I'm setting a
> variable by default of the same way than it's set in the setter.
>
> ---
> class Foo(object):
>def __init__(self, bar):
> self._bar = self._change
Kless wrote:
> Is there any way to simplify the next code? Because I'm setting a
> variable by default of the same way than it's set in the setter.
>
> ---
> class Foo(object):
>def __init__(self, bar):
> self._bar = self._change(bar) # !!! as setter
What's wrong with
Is there any way to simplify the next code? Because I'm setting a
variable by default of the same way than it's set in the setter.
---
class Foo(object):
def __init__(self, bar):
self._bar = self._change(bar) # !!! as setter
@property
def bar(self):
return se