the deceptive continuous assignments
Chris Angelico
rosuav at gmail.com
Tue Dec 6 17:20:50 EST 2011
On Wed, Dec 7, 2011 at 9:11 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> Cute. I am used to linked lists being built from the bottem up in functional
> languages with immutable nodes. I might even use something like this. Of
> course, for a list of any length, walk needs to be iterative.
>
> def walk(self):
> while self:
>
> print("My payload is: "+self.payload)
> self = self.next
Of course, but I was coding top-down and didn't feel like going back
to add the "while" :)
ChrisA
More information about the Python-list
mailing list