On Tue, Oct 27, 2020 at 11:24 PM Chris Angelico wrote:
> On Wed, Oct 28, 2020 at 5:12 PM Stephen J. Turnbull
> wrote:
> > > thing[i,j,k] is exactly equivalent to thing[(i,j,k)] because the
> tuple is
> > > "created by" the parentheses.
> >
> > Is that correct? As I understand it, the tuple
Christopher Barker and Stephen J. Turnbull wrote:
> As a statement clause separator, which becomes ambiguous:
>
> if thing: x
>
Yes. Very good. Well done, both of you.
Now consider this. PEP 643 allows for things like
obj[a=x:y]
and "may open up the open the possibility" of allowing
On 2020-10-27 23:10, Stephen J. Turnbull wrote:
And in dict displays, where generalized slices could be used as
components, rather than treating ':' merely as a separator. (I write
"generalized" because I presume slices are currently specialized to
ints).
Non-int slices are valid and are
On Wed, Oct 28, 2020 at 5:12 PM Stephen J. Turnbull
wrote:
>
> Christopher Barker writes:
>
> > thing[i,j,k] is exactly equivalent to thing[(i,j,k)] because the tuple is
> > "created by" the parentheses.
>
> Is that correct? As I understand it, the tuple is created by the
> commas, and the
Christopher Barker writes:
> thing[i,j,k] is exactly equivalent to thing[(i,j,k)] because the tuple is
> "created by" the parentheses.
Is that correct? As I understand it, the tuple is created by the
commas, and the parentheses are basically thrown away by the parser,
as usual.
> and