[Python-ideas] Re: Ricky Teachey's email to me on PEP 637, and my responses

2020-10-27 Thread Brendan Barnwell
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 used

[Python-ideas] Re: Ricky Teachey's email to me on PEP 637, and my responses

2020-10-27 Thread Chris Angelico
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 pare

[Python-ideas] Re: Ricky Teachey's email to me on PEP 637, and my responses

2020-10-27 Thread Stephen J. Turnbull
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 thing[1

[Python-ideas] Re: Bringing the print statement back

2020-10-27 Thread Daniel.
My little contribution I will always prefer expressions over statements. So, -1 for bringing back a statement for something that we have a function for. Functions are first citizens, statement are not Now if we are talking about parenthesesless expressions, if we're designing a language from scra

[Python-ideas] Multiple dispatch for comparison operators?

2020-10-27 Thread Neil Girdhar
The way I understand it, multiple dispatch is programming language feature wehreby a function or method overload is chosen based on run time types. Python already has single dispatch (functools.singledispatch). It also has the concept of overloads for type annotations (typing.overload). My ma

[Python-ideas] Re: 'Infinity' constant in Python

2020-10-27 Thread Neil Girdhar
You might be interested in https://pypi.org/project/extended-int/ On Sunday, September 6, 2020 at 12:41:04 AM UTC-4 Cade Brown wrote: > Fair enough, I guess people have managed without it and there are plenty > of "good-enough" solutions for this that can be used in the place. > > I can see it's