17 Jun
2018
17 Jun
'18
11:53 p.m.
On 2018-06-17 7:36 PM, Clint Hepner wrote:
On Jun 17, 2018, at 4:18 PM, Chris Angelico <rosuav@gmail.com> wrote:
On Mon, Jun 18, 2018 at 3:01 AM, Mikhail V <mikhailwas@gmail.com> wrote: The idea is to introduce new syntax for the list.append() method.
Syntax:
Variant 1. Use special case of index, namely omitted index:
mylist[] = item Creation of syntax cannot be done for just one type. That’s false. @ was added solely for matrix multiplication.
It was added for matrix multiplication, but any type that wants to use the feature can by implementing __matmul__ et al. It's not clear from Mikhail's proposal how types would opt into the append syntax. Alex