What is a function parameter =[] for?
Ned Batchelder
ned at nedbatchelder.com
Tue Nov 24 13:54:37 EST 2015
On Tuesday, November 24, 2015 at 1:45:34 PM UTC-5, Antoon Pardon wrote:
> Whether you want to call it literals or something else, the fact
> remains that (3, 5, 8) is treated like -42 by the CPython interpreter
> and [3, 5, 8] is not.
Maybe I've lost the original point in all this minutia about what is a
literal and what is not. Isn't the key point here that some objects
are mutable (lists), and some are not (tuples, ints)?
--Ned.
More information about the Python-list
mailing list