Re: Confusion regarding constructor as default value

2007-09-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On 27 Sep, 15:03, [EMAIL PROTECTED] wrote: >> Why are the following different? >> >> def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""), >> ExpiryDate(""))): >> # check to see if the row already exists, if not add it to >> the >> container >> >>

Re: Confusion regarding constructor as default value

2007-09-27 Thread aine_canby
On 27 Sep, 15:34, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Why are the following different? > > > def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""), > > ExpiryDate(""))): > > # check to see if the row already exists, if not add it to the > > container

Re: Confusion regarding constructor as default value

2007-09-27 Thread aine_canby
On 27 Sep, 15:03, [EMAIL PROTECTED] wrote: > Why are the following different? > > def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""), > ExpiryDate(""))): > # check to see if the row already exists, if not add it to the > container > > if not self.dict.has_ke

Re: Confusion regarding constructor as default value

2007-09-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Why are the following different? > > def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""), > ExpiryDate(""))): > # check to see if the row already exists, if not add it to the > container > > if not self.dict.has_key(rowName): > self.dict[rowName] = tableRow >

Confusion regarding constructor as default value

2007-09-27 Thread aine_canby
Why are the following different? def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""), ExpiryDate(""))): # check to see if the row already exists, if not add it to the container if not self.dict.has_key(rowName): self.dict[rowName] =