Jacob Nilsson <jacob.nils...@ltu.se> added the comment:
I don't understand, do you mean that lists should work like in your example? Or that your example code doesn't run? If you mean the first issue, that is ok I guess but I've never used indexing like that outside of numpy, pandas and the like. If you mean the second issue, it doesn't run because you are indexing a 0-dim array with 4 indices, if you instead try with a 1-dim array: >>> import numpy as np >>> a = np.array([0]) # 1-dim array instead of 0-dim >>> print(a[[0, *[0, 0], 0]]) [0, 0, 0, 0] You get the expected output. ---------- nosy: +ajoino _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45586> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com