Closed cclauss closed 3 months ago
TIL:
>>> big = []
>>> little = []
>>> big.append(("little", little))
>>> big
[('little', [])]
>>> for c in "abc":
... little.append(c)
...
>>> little
['a', 'b', 'c']
>>> big
[('little', ['a', 'b', 'c'])]
Once pre-commit
is merged, we can add auto-walrus
if you would like...
% auto-walrus **/*.py
Rewriting buildconfig/msysio.py
Rewriting src_py/sprite.py
Rewriting src_py/sysfont.py
Rewriting test/controller_test.py
Rewriting test/mask_test.py
Rewriting test/mixer_test.py
Rewriting test/test_utils/test_runner.py
Currently, this code is ALWAYS adding an empty list instead of the data files that were found by
glob.glob()
.It adds the empty list before filling the list!