"Dave Angel" <[email protected]> wrote in message news:[email protected]... > On 05/08/2015 06:53 AM, Frank Millman wrote: >> > > It might be appropriate to define the list at top-level, as > > EMPTY_LIST=[] > > and in your default argument as > def x(y, z=EMPTY_LIST): > > and with the all-caps, you're thereby promising that nobody will modify > that list. > > (I'd tend to do the None trick, but I think this alternative would be > acceptable) >
Thanks, Dave, I like that idea. However, as you can see from my other replies, I have decided to go with the flow, and use the None trick. Frank -- https://mail.python.org/mailman/listinfo/python-list
