On 03/05/17 23:21, Larry Martell wrote:
But not for a variable like a list or dict?
What name should "[1, 2, 3]", or "{1, 'a': 2: 'b'}" be given?
The thing about functions or classes is that you can't (at the literal
source level) define them *without* giving them a name:
def func(): pass
class cls: pass
But lists and tuples and ints and strings and dicts and sets and floats
and probably something else I've forgotten can be spelled as anonymous
literals.
E.
--
https://mail.python.org/mailman/listinfo/python-list