[Python-ideas] Re: Issue 34850: Syntax Warning in the real world (is 0 / is 1)

2020-03-31 Thread M.-A. Lemburg
On 3/31/2020 7:58 PM, Serhiy Storchaka wrote: > 31.03.20 20:21, Andrew Barnert via Python-ideas пише: >> Do you have code that you think actually _should_ be using is 1? Or >> code that you have to compile over and over (e.g., your deployment >> server doesn’t cache .pyc files, or you spawn new

[Python-ideas] Re: Issue 34850: Syntax Warning in the real world (is 0 / is 1)

2020-03-31 Thread Serhiy Storchaka
31.03.20 20:21, Andrew Barnert via Python-ideas пише: Do you have code that you think actually _should_ be using is 1? Or code that you have to compile over and over (e.g., your deployment server doesn’t cache .pyc files, or you spawn new instances all the time without pre-built .pycs, or

[Python-ideas] Re: Issue 34850: Syntax Warning in the real world (is 0 / is 1)

2020-03-31 Thread Andrew Barnert via Python-ideas
On Mar 31, 2020, at 05:59, Philip Kahn wrote: > > I understand it locks in that particular implementation detail, but it also > seems unlikely that that particular optimization (int 0 and int 1 as specific > memory objects) would ever make sense to NOT be including in a shipping >

[Python-ideas] Re: Issue 34850: Syntax Warning in the real world (is 0 / is 1)

2020-03-31 Thread Nick Timkovich
> > I understand it locks in that particular implementation detail, but it > also seems unlikely that that particular optimization (int 0 and int 1 as > specific memory objects) would ever make sense to NOT be including in a > shipping implementation (future proof by practicality). > Do you

[Python-ideas] Re: Issue 34850: Syntax Warning in the real world (is 0 / is 1)

2020-03-31 Thread Chris Angelico
On Tue, Mar 31, 2020 at 11:57 PM Philip Kahn wrote: > > Yikes, this change is spitting out a lot of warnings on first run, and plenty > in stuff that's not my code to boot. > > A huge number of the cases, though, seem to be "is 0" and "is 1" comparisons. > Having read through the original issue