Re: an adventure: a Lisp-style linked list
Ethan Carter <[email protected]> Fri, 05 Sep 2025 13:06:06 -0300
| Newsgroups | comp.lang.python |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
[email protected] (Pierre Asselin) writes: > Ethan Carter <[email protected]> wrote: > >> def __init__(self, d, ls): >> self.head = d >> self.tail = ls > > Why not > def __init__(self, d, ls=None): > > and avoid the need for a List.Empty ? Thanks! That's a good suggestion.