Recursively traverse linked list -- help!
Yrjö Hatakka
yhatakka at dlc.nospam.fi
Wed Feb 20 01:24:53 EST 2002
More information about the Python-list mailing list
Wed Feb 20 01:24:53 EST 2002
- Previous message (by thread): Editable strings anyone?
- Next message (by thread): Recursively traverse linked list -- help!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 19 Feb 2002 18:13:29 -0800, Paul Rubin <phr-n2002a at nightsong.com> wrote: > "Mike Carifio" <carifio.nospam at nospam.usys.com> writes: >> >> def traverse(list): >> if list: >> print list[0] # or do something here >> traverse(list[1:]) >> else: >> print "done" >> > > That's ok in Scheme but I don't think any current Python implementations > handle tail recursion "correctly". What do you mean? I tried above an it seems to work. When does it stop working? I used Python 2.2 yrjö
- Previous message (by thread): Editable strings anyone?
- Next message (by thread): Recursively traverse linked list -- help!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list