[Python-ideas] Re: Allowing non-ASCII bracket and quote characters in source code

2022-01-20 Thread Brendan Barnwell
On 2022-01-20 23:08, Greg Ewing wrote: On 20/01/22 12:52 pm, Christopher Barker wrote: >On Wed, Jan 19, 2022 at 2:12 PM Greg Ewing > wrote: > > Those particular brackets are really confusing because they're half > square and half round. > >And THAT is

[Python-ideas] Re: Allowing non-ASCII bracket and quote characters in source code

2022-01-20 Thread Greg Ewing
On 20/01/22 12:52 pm, Christopher Barker wrote: On Wed, Jan 19, 2022 at 2:12 PM Greg Ewing > wrote: Those particular brackets are really confusing because they're half square and half round. And THAT is why this is a bad idea. It doesn't mean

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-20 Thread Greg Ewing
On 20/01/22 3:17 am, Joao S. O. Bueno wrote: But upon seeing a method call, we can just think first of a runtime behavior Correctly, btw. Any optimization there would be an exception, that people would have to know by heart. Frozensets are immutable, so nobody should be making any

[Python-ideas] Re: "frozen" operator Re: Revisiting a frozenset display literal

2022-01-20 Thread Eric V. Smith
See also the rejected PEP 351. -- Eric > On Jan 20, 2022, at 7:21 PM, Cameron Simpson wrote: > > Well, I've just waded through this discussion. > > This all feels to me like a special case of "wanting a constant for > bytecode". What is we had a "freeze" operator, eg: > >|foo| > >

[Python-ideas] Re: "frozen" operator Re: Revisiting a frozenset display literal

2022-01-20 Thread MRAB
On 2022-01-21 00:18, Cameron Simpson wrote: Well, I've just waded through this discussion. This all feels to me like a special case of "wanting a constant for bytecode". What is we had a "freeze" operator, eg: |foo| which would produce a frozen version of foo. I'm liking the vertical

[Python-ideas] "frozen" operator Re: Revisiting a frozenset display literal

2022-01-20 Thread Cameron Simpson
Well, I've just waded through this discussion. This all feels to me like a special case of "wanting a constant for bytecode". What is we had a "freeze" operator, eg: |foo| which would produce a frozen version of foo. I'm liking the vertical bars myself, I think because it feels vaguely

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-20 Thread Ricky Teachey
On Thu, Jan 20, 2022 at 3:35 AM Stephen J. Turnbull < stephenjturnb...@gmail.com> wrote: > Christopher Barker writes: > > > If this does all come to pass, then: > > > > s = {3,8,2}.frozen() > > will be slightly faster, in some case, than > > s = frozenset({3,8,2} > > > > but the result

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-20 Thread Stephen J. Turnbull
Christopher Barker writes: > If this does all come to pass, then: > > s = {3,8,2}.frozen() > will be slightly faster, in some case, than > s = frozenset({3,8,2} > > but the result would be the same. > > There are plenty of tricks to in python to get a touch more performance, > this