June 19, 2018
12:23 a.m.
On Mon, Jun 18, 2018 at 05:07:45PM -0300, Joao S. O. Bueno wrote:
a = [1,2, 3] a <<= 4 resulting in a == [1, 2, 3, 4] is quite readable
Not as readable as a.append(4), which works today and doesn't require the user to memorise the special case that <<= works on lists but (presumably) << doesn't. Or perhaps it would. What would a bare << mean for lists? b = a << 4 could mean the same as b = a + [4] but we already have a spelling for that, do we really need another one? -- Steve