Rafe a écrit :
On Aug 16, 1:22 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
Rafea écrit :
Hi,
I've been thinking in circles about these aspects of Pythonic design
and I'm curious what everyone else is doing and thinks. There are 3
issues here:
1) 'Declaring' attributes
There's nothing l
On Aug 16, 1:22 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Rafea écrit :
>
> > Hi,
>
> > I've been thinking in circles about these aspects of Pythonic design
> > and I'm curious what everyone else is doing and thinks. There are 3
> > issues here:
>
> > 1) 'Declaring' attributes
>
> There'
Fredrik Lundh a écrit :
Eric Brunel wrote:
To add to what others have already said, it is not only 'just extra
work', it is also quite dangerous. See:
class A(object):
children = []
the OP is aware of that, of course:
> I set anything that is constant but anything variable is set again
Eric Brunel wrote:
To add to what others have already said, it is not only 'just extra
work', it is also quite dangerous. See:
class A(object):
children = []
the OP is aware of that, of course:
> I set anything that is constant but anything variable is set again in
> __init__()
as long a
On Fri, 15 Aug 2008 20:02:36 +0200, Rafe <[EMAIL PROTECTED]> wrote:
[snip]
1) 'Declaring' attributes - I always felt it was good code practice to
declare attributes in a section of the class namespace. I set anything
that is constant but anything variable is set again in __init__():
Class A(obj
Bruno Desthuilliers wrote:
How often do you really need to override a property ? (hint : as far as
I'm concerned, it never happened so far). Now you have two solutions :
either redefine the whole property in the derived class, or, if you
really intend your property to be overriden, provide a "t
Rafe a écrit :
Hi,
I've been thinking in circles about these aspects of Pythonic design
and I'm curious what everyone else is doing and thinks. There are 3
issues here:
1) 'Declaring' attributes
There's nothing like "declaration" of variables/attributes/whatever in
Python.
- I always fel
Hi,
I've been thinking in circles about these aspects of Pythonic design
and I'm curious what everyone else is doing and thinks. There are 3
issues here:
1) 'Declaring' attributes - I always felt it was good code practice to
declare attributes in a section of the class namespace. I set anything