On 10 Ago, 17:57, Stefan Schwarzer wrote:
> Hi,
>
> On 2010-08-10 17:01, Francesco Bochicchio wrote:
>
> > There used to be a very nice (also graphic) explanationor this
> > somewhere on the web, but my googling skills failed me this time,
> > so instead I'll show you the concept using your own co
On 10 Ago, 13:58, Jonas Nilsson wrote:
You stumbled in two python common pitfalls at once :-)
One, the default arguments issue, was already pointed to you.
The other one is that python variables are just names for objects.
Assigning a variable never mean making a copy, it just means using
Hi,
On 2010-08-10 17:01, Francesco Bochicchio wrote:
> There used to be a very nice (also graphic) explanationor this
> somewhere on the web, but my googling skills failed me this time,
> so instead I'll show you the concept using your own code:
Probably this isn't the page you're referring to, b
On 10 Ago, 13:58, Jonas Nilsson wrote:
> Hello,
>
> Lets say that I want to feed an optional list to class constructor:
>
> class Family():
> def __init__(self, fName, members = []):
> self.fName = fName
> self.members = members
>
> Now, lets add members to
On Tue, Aug 10, 2010 at 4:58 AM, Jonas Nilsson wrote:
> Hello,
>
> Lets say that I want to feed an optional list to class constructor:
>
> class Family():
> def __init__(self, fName, members = []):
> self.fName = fName
> self.members = members
>
> Now, lets add
Jonas Nilsson wrote:
> Lets say that I want to feed an optional list to class constructor:
>
> class Family():
> def __init__(self, fName, members = []):
> Why on earth is the output ['Bill', 'Joe']!? Is there a simple
> solution that separates f1 and f2 without forcing me to write code for