Re: Odd Errors

2008-10-03 Thread greg
Steven D'Aprano wrote: "Side-effect" has the technical meaning in functional languages of any change of state that isn't the creation and return of a function result. Actually, the term has that meaning for all programming languages. The main distinguishing feature of functional languages is t

Re: Odd Errors

2008-10-02 Thread Steven D'Aprano
On Thu, 02 Oct 2008 18:52:58 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, > Steven D'Aprano wrote: > >> On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: >> >>> In message >>> <[EMAIL PROTECTED]>, >>> Aaron "Castironpi" Brady wrote: >>> Do you ever want

Re: Odd Errors

2008-10-02 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aaron "Castironpi" Brady wrote: > On Oct 2, 12:52 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: > >> In message <[EMAIL PROTECTED]>, >> Steven >> >> D'Aprano wrote: >> > On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: >>

Re: Odd Errors

2008-10-02 Thread Aaron "Castironpi" Brady
On Oct 2, 12:52 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Steven > > D'Aprano wrote: > > On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: > > >> In message > >> <[EMAIL PROTECTED]>, > >> Aaron "Castironpi" Brady wrote:

Re: Odd Errors

2008-10-01 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: > >> In message >> <[EMAIL PROTECTED]>, >> Aaron "Castironpi" Brady wrote: >> >>> Do you ever want to scream from the rooftops, "'append' operates by >>> side-effect!"? >> >>

Re: Odd Errors

2008-10-01 Thread Steven D'Aprano
On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: > In message > <[EMAIL PROTECTED]>, > Aaron "Castironpi" Brady wrote: > >> Do you ever want to scream from the rooftops, "'append' operates by >> side-effect!"? > > No. It's an effect, not a side-effect. "Side-effect" has the techni

Re: Odd Errors

2008-10-01 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aaron "Castironpi" Brady wrote: > Do you ever want to scream from the rooftops, "'append' operates by > side-effect!"? No. It's an effect, not a side-effect. -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd Errors

2008-09-28 Thread Nathan Seese
> On Sep 28, 7:13 pm, alex23 <[EMAIL PROTECTED]> wrote: >> The problem is with this: >> >> >         lines = lines.append(inLine) >> >> The append method of a list modifies the list in-place, it doesn't >> return a copy of the list with the new element appended. In fact, it >> returns None, which i

Re: Odd Errors

2008-09-28 Thread alex23
"Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > Do you ever want to scream from the rooftops, "'append' operates by > side-effect!"? "I'm mad as hell, and I'm not going to mutate in-place anymore!" -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd Errors

2008-09-28 Thread Aaron "Castironpi" Brady
On Sep 28, 7:13 pm, alex23 <[EMAIL PROTECTED]> wrote: > The problem is with this: > > >         lines = lines.append(inLine) > > The append method of a list modifies the list in-place, it doesn't > return a copy of the list with the new element appended. In fact, it > returns None, which it then at

Re: Odd Errors

2008-09-28 Thread alex23
The problem is with this: >         lines = lines.append(inLine) The append method of a list modifies the list in-place, it doesn't return a copy of the list with the new element appended. In fact, it returns None, which it then attaches the label 'lines' to, so the next iteration through it trie