Where are python's splat operators * and ** valid?
问题 The unpacking/splat operators * and ** differ widely in their applicability across python versions (2.7, 3.x < 3.5 and 3.x >= 3.5). For example: | 2.7 | 3.1-3.4 | 3.5 ---------------------------------------------------------------------- function(*args) ✓ ✓ ✓ x, *y, z = [1, 2, 3, 4, 5] x ✓ ✓ {**x, **y} x x ✓ Are there any more discrepancies between the various versions that I've missed? I'm looking through PEP and Readmes but the docs aren't detailed with this. 回答1: Around 1992 (not sure