29 Aug
2020
29 Aug
'20
12:24 a.m.
On 29/08/20 2:07 pm, Steven D'Aprano wrote:
Better would be to add a new future directive to change the parsing of subscripts, and allow people to opt-in when they are ready on a per-module basis.
from __future__ import subscript_arguments
I don't think that would help, at least not on its own. The style of subscript argument passing required depends on the object being indexed, not the module it's being done from. There could be a future import that just makes a[1,] mean a[1] instead of a[(1,)], but how useful would that really be? How often have you wanted to put a trailing comma on your indexes and have it do nothing? -- Greg