[issue42927] Inline cache for slots

2021-01-13 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +23043 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/24216 ___ Python tracker

[issue42927] Inline cache for slots

2021-01-13 Thread Guido van Rossum
New submission from Guido van Rossum : I've been thinking about Python performance improvements, and I played around with an inline cache enhancement that supports slots. The results on a very simple benchmark look promising (30% speedup) but I'm terrible with our benchmarking tools, and

Re: Application window geometry specifier

2021-01-13 Thread 2QdxY4RzWzUUiLuE
On 2021-01-13 at 21:41:26 -0600, Python wrote: > On Thu, Jan 14, 2021 at 12:27:19PM +1100, Chris Angelico wrote: > > On Thu, Jan 14, 2021 at 12:11 PM Python wrote: > > > > > > On Tue, Jan 12, 2021 at 06:43:39PM -, Grant Edwards wrote: > > > > And those X11 users will swear at you if you

Re: Application window geometry specifier

2021-01-13 Thread Python
On Thu, Jan 14, 2021 at 03:02:05PM +1100, Chris Angelico wrote: > On Thu, Jan 14, 2021 at 2:43 PM Python wrote: > > > it is far FAR better to put control in the user's hands > > > > I love how you dismissed that the semantics I described gives MORE > > control to the user, not less, without

[issue38250] enum.Flag should be more set-like

2021-01-13 Thread Ethan Furman
Ethan Furman added the comment: The code sample: class Color(IntFlag): BLACK = 0 RED = 1 GREEN = 2 BLUE = 4 PURPLE = RED | BLUE WHITE = RED | GREEN | BLUE Here's the summary of the changes: - single-bit flags are canonical - multi-bit and

Re: count consecutive elements

2021-01-13 Thread Tim Chase
On 2021-01-13 18:20, Dan Stromberg wrote: > I'm kind of partial to: > > import collections > import typing > > > def get_longest(string: str) -> typing.Tuple[int, str]: > """Get the longest run of a single consecutive character.""" > dict_: typing.DefaultDict[str, int] = >

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 2:43 PM Python wrote: > > it is far FAR better to put control in the user's hands > > I love how you dismissed that the semantics I described gives MORE > control to the user, not less, without actually sacrificing anything. Actually, you give control to the application,

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Hi, David, On Wed, Jan 13, 2021 at 9:24 PM David L Neil via Python-list wrote: > > On 14/01/2021 15.25, boB Stepp wrote: > > On Wed, Jan 13, 2021 at 7:28 PM Chris Angelico wrote: > > > >> I love how "I think" is allowed to trump decades of usability research. > > I'm just pleased that @Chris

Re: Application window geometry specifier

2021-01-13 Thread Python
On Thu, Jan 14, 2021 at 12:27:19PM +1100, Chris Angelico wrote: > On Thu, Jan 14, 2021 at 12:11 PM Python wrote: > > > > On Tue, Jan 12, 2021 at 06:43:39PM -, Grant Edwards wrote: > > > And those X11 users will swear at you if you override their window > > > managers configured window

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Chris, On Wed, Jan 13, 2021 at 8:12 PM Chris Angelico wrote: > > On Thu, Jan 14, 2021 at 1:05 PM Igor Korot wrote: > > > > Chris, > > > > On Wed, Jan 13, 2021 at 7:45 PM Chris Angelico wrote: > > > > > > On Thu, Jan 14, 2021 at 12:39 PM Igor Korot wrote: > > > > > > > > Chris, > > > > > > > >

Re: Application window geometry specifier

2021-01-13 Thread dn via Python-list
On 14/01/2021 15.25, boB Stepp wrote: > On Wed, Jan 13, 2021 at 7:28 PM Chris Angelico wrote: > >> I love how "I think" is allowed to trump decades of usability research. I'm just pleased that @Chris has found love! (not detracting from the point though) > Can you recommend a good reference

Re: Application window geometry specifier

2021-01-13 Thread David L Neil via Python-list
On 14/01/2021 15.25, boB Stepp wrote: > On Wed, Jan 13, 2021 at 7:28 PM Chris Angelico wrote: > >> I love how "I think" is allowed to trump decades of usability research. I'm just pleased that @Chris has found love! (not detracting from the point though) > Can you recommend a good reference

Re: Application window geometry specifier

2021-01-13 Thread boB Stepp
On Wed, Jan 13, 2021 at 7:28 PM Chris Angelico wrote: > I love how "I think" is allowed to trump decades of usability research. Can you recommend a good reference for someone relatively new to GUI programming that is based on such research? Book or web reference would be fine. Cheers! boB --

Re: count consecutive elements

2021-01-13 Thread Dan Stromberg
On Wed, Jan 13, 2021 at 5:59 PM Tim Chase wrote: > On 2021-01-13 21:20, Bischoop wrote: > > I want to to display a number or an alphabet which appears mostly > > consecutive in a given string or numbers or both > > Examples > > s= ' aabskaaabad' > > output: c > > # c appears 4 consecutive

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 1:05 PM Igor Korot wrote: > > Chris, > > On Wed, Jan 13, 2021 at 7:45 PM Chris Angelico wrote: > > > > On Thu, Jan 14, 2021 at 12:39 PM Igor Korot wrote: > > > > > > Chris, > > > > > > On Wed, Jan 13, 2021 at 7:33 PM Chris Angelico wrote: > > > > > > > > On Thu, Jan 14,

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Chris, On Wed, Jan 13, 2021 at 7:45 PM Chris Angelico wrote: > > On Thu, Jan 14, 2021 at 12:39 PM Igor Korot wrote: > > > > Chris, > > > > On Wed, Jan 13, 2021 at 7:33 PM Chris Angelico wrote: > > > > > > On Thu, Jan 14, 2021 at 12:18 PM Python wrote: > > > > > The results will differ based

Re: count consecutive elements

2021-01-13 Thread Tim Chase
On 2021-01-13 21:20, Bischoop wrote: > I want to to display a number or an alphabet which appears mostly > consecutive in a given string or numbers or both > Examples > s= ' aabskaaabad' > output: c > # c appears 4 consecutive times > 8bbakebaoa > output: b > #b appears 2 consecutive times

Re: Application window geometry specifier

2021-01-13 Thread Greg Ewing
On 14/01/21 1:58 pm, Chris Angelico wrote: On Thu, Jan 14, 2021 at 11:53 AM Python wrote: I believe it is or was quite common for large, integrated applications like DAWs, graphical design software, etc. to remember where you placed your various floating toolbars and add-ons Not just large,

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 12:39 PM Igor Korot wrote: > > Chris, > > On Wed, Jan 13, 2021 at 7:33 PM Chris Angelico wrote: > > > > On Thu, Jan 14, 2021 at 12:18 PM Python wrote: > > > > The results will differ based on whether the user in question has > > > > basically just one primary application

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Chris, On Wed, Jan 13, 2021 at 7:33 PM Chris Angelico wrote: > > On Thu, Jan 14, 2021 at 12:18 PM Python wrote: > > > The results will differ based on whether the user in question has > > > basically just one primary application (an IDE, or some gigantic app > > > like Adobe PhotoShop) that

[issue42762] infinite loop resulted by "yield"

2021-01-13 Thread Xinmeng Xia
Xinmeng Xia added the comment: I see,Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 12:18 PM Python wrote: > > The results will differ based on whether the user in question has > > basically just one primary application (an IDE, or some gigantic app > > like Adobe PhotoShop) that they spend all their time in > > OK, so you admit that such apps do exist.

[issue38250] enum.Flag should be more set-like

2021-01-13 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23042 pull_request: https://github.com/python/cpython/pull/24215 ___ Python tracker ___

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Hi, On Wed, Jan 13, 2021 at 7:20 PM Python wrote: > > On Thu, Jan 14, 2021 at 11:58:34AM +1100, Chris Angelico wrote: > > On Thu, Jan 14, 2021 at 11:53 AM Python wrote: > > Have you actually done any research by (a) asking people what they > > actually prefer, and better still (b) silently

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 12:11 PM Python wrote: > > On Tue, Jan 12, 2021 at 06:43:39PM -, Grant Edwards wrote: > > And those X11 users will swear at you if you override their window > > managers configured window placement. Application code should not care > > about or try to control window

Re: Application window geometry specifier

2021-01-13 Thread Igor Korot
Hi, On Wed, Jan 13, 2021 at 7:12 PM Python wrote: > > On Tue, Jan 12, 2021 at 06:43:39PM -, Grant Edwards wrote: > > And those X11 users will swear at you if you override their window > > managers configured window placement. Application code should not care > > about or try to control

[issue32218] add __iter__ to enum.Flag members

2021-01-13 Thread Ethan Furman
Ethan Furman added the comment: Final outcome: `Flag` has been redesigned such that any flag comprised of a single bit is canonical; flags comprised of multiple bits are considered aliases. During iteration only canonical flags are returned. -- resolution: -> fixed stage: patch

Re: Application window geometry specifier

2021-01-13 Thread Python
On Thu, Jan 14, 2021 at 11:58:34AM +1100, Chris Angelico wrote: > On Thu, Jan 14, 2021 at 11:53 AM Python wrote: > Have you actually done any research by (a) asking people what they > actually prefer, and better still (b) silently watching over someone's > shoulder and seeing which one makes

Re: Application window geometry specifier

2021-01-13 Thread Python
On Tue, Jan 12, 2021 at 06:43:39PM -, Grant Edwards wrote: > And those X11 users will swear at you if you override their window > managers configured window placement. Application code should not care > about or try to control window geometry. Period. I think this is just plain wrong. If

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 14/01/21 11:09 am, Grant Edwards wrote: Perhaps I need to recalibrate my adjectives, but with 256KB+ of flash and 32KB+ of RAM, I wouldn't call them "small" It's small by today's standards, when you consider that multiple GB of RAM is commonplace now in most "real" computers. -- Greg --

Re: Application window geometry specifier

2021-01-13 Thread Chris Angelico
On Thu, Jan 14, 2021 at 11:53 AM Python wrote: > > On Wed, Jan 13, 2021 at 10:07:23AM +1100, Chris Angelico wrote: > > On Wed, Jan 13, 2021 at 10:02 AM Igor Korot wrote: > > > But for my dialogs (especially for dialogs where I need to ask for > > > credentials) - I don't think I want > > > WM to

Re: Application window geometry specifier

2021-01-13 Thread Python
On Wed, Jan 13, 2021 at 10:07:23AM +1100, Chris Angelico wrote: > On Wed, Jan 13, 2021 at 10:02 AM Igor Korot wrote: > > But for my dialogs (especially for dialogs where I need to ask for > > credentials) - I don't think I want > > WM to do my job. > > > > Again - we are talking positioning here

[issue42923] Py_FatalError(): dump the list of extension modules

2021-01-13 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 13/01/21 7:57 pm, Christian Gollwitzer wrote:  What do you mean, "until" ? https://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c He's using Micropython. That's cheating! :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: count consecutive elements

2021-01-13 Thread Bischoop
On 2021-01-13, Bischoop wrote: > t = set(s) # set of characters in s I have this one changed to: t= list(set(s)) -- https://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-5.4b1: Linux and Mac users, please test wheels!

2021-01-13 Thread Matt Davis
=== Announcing PyYAML-5.4b1 === A beta release of PyYAML is now available: https://github.com/yaml/pyyaml/releases/tag/5.4b1 This release contains a security fix for CVE-2020-14343. It removes the python/module, python/object, and python/object/new tags

Re: FridayFinking - Was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Rich Shepard
On Thu, 14 Jan 2021, dn via Python-list wrote: Concerning the definition of "old" - when I'm having a 'good day', it's anyone several years my senior (and above) - when I'm creaking and groaning, it's anyone remotely my age, and older. About 45 years ago a 25-year-older friend of mine offered

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grant Edwards
On 2021-01-13, Peter Pearson wrote: > On Mon, 11 Jan 2021 15:37:58 -0500, DonK > wrote: > [snip] >> >> I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they >> look kinda like adding a family room onto a 1986 double wide mobile >> home, > > Agreed. > > Browsergui is not widely

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grant Edwards
On 2021-01-13, Dennis Lee Bieber wrote: > On Tue, 12 Jan 2021 15:18:05 - (UTC), Grant Edwards > declaimed the following: >>On 2021-01-12, songbird wrote: >> >>> it can be used for pretty much anything except perhaps high >>> pressure real time things, but i bet someone else will know that

count consecutive elements

2021-01-13 Thread Bischoop
I want to to display a number or an alphabet which appears mostly consecutive in a given string or numbers or both Examples s= ' aabskaaabad' output: c # c appears 4 consecutive times 8bbakebaoa output: b #b appears 2 consecutive times I thought about set the string then and for each

FridayFinking - Was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread dn via Python-list
On 14/01/2021 04.54, Grimble wrote: > On 11/01/2021 20:37, DonK wrote: >> >> Hi, I'm thinking about learning Python but I'm 74 years old and will >> very likely not ever have a programming job again. > At 83, I have no intention of having a programming job again! I last > coded something

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-01-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: > Why do we keep setuptools? I agree; would be good to remove it if possible. There are many packages that fail to build without Setuptools being present or --use-pep517 indicated. It would be nice if pip could make --use-pep517 the default, update that

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Berker Peksag
Berker Peksag added the comment: New changeset a330365ca5ae836075f306334ab648bf23471481 by Erlend Egeberg Aasland in branch 'master': bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214) https://github.com/python/cpython/commit/a330365ca5ae836075f306334ab648bf23471481

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-13 Thread Ethan Furman
Ethan Furman added the comment: Yes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: learning python building 2nd app, need advices

2021-01-13 Thread Phil Boutros
Loris Bennett wrote: > As an Emacs user, personally I would use the command > > M-x untabify > > within Emacs. I assume that Vim has something similar. It does. ':retab' is what you want. If you have tabstop set to a specific value, it'll use that. If not, you can do ':retab ', where

Re: conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Cameron Simpson
On 13Jan2021 10:37, songbird wrote: > my momentary conceptual problem is that to me OOP means >being able to encapsulate data structures and code from >other parts of the program, but to me it doesn't look like >that is how python is designed. this is probably a complete >aside to this whole

[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: I’m not sure I agree that it’s a big win. You can always add such a utility function in your code. -- ___ Python tracker ___

[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2021-01-13 Thread Ulrich Petri
Ulrich Petri added the comment: Functionally equivalent code would be: print("".join(TracebackException.from_exception(ex, capture_locals=True).format())) vs. (hypothetically) print_exc(capture_locals=True) Which is quite a significant difference IMO. --

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-13 Thread Kevin Chen
Kevin Chen added the comment: Awesome thanks! Does the rewrite fix the issue with creating negated flags as well? -- ___ Python tracker ___

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Peter Pearson
On Mon, 11 Jan 2021 15:37:58 -0500, DonK wrote: [snip] > > I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they > look kinda like adding a family room onto a 1986 double wide mobile > home, Agreed. Browsergui is not widely popular (I don't think anybody but me has mentioned

[issue42925] Error trace of else inside class

2021-01-13 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23041 pull_request: https://github.com/python/cpython/pull/24214 ___ Python tracker ___

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, but I prefer the following: size as maxrows: int(c_default='self->arraysize', py_default='') = 1 -- ___ Python tracker ___

[issue28146] Confusing error messages in str.format()

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: My PR fixes the second case ('{: }') and Serhiy's PR on Issue27772 fixes the first case ('{:04}'). -- ___ Python tracker ___

[issue28146] Confusing error messages in str.format()

2021-01-13 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 4.0 -> 5.0 pull_requests: +23040 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24213 ___ Python tracker

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: > "The implementation is allowed to skip any boolean test of a value, when it > has *no* effect on the flow of the program and at least one test has already > been performed on that value." +1 -- ___ Python

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Steve Stagg
Steve Stagg added the comment: Sounds great to me (with my approximately zero optimizer experience) At risk of taking this too far, you /could/ add something like: "skip any boolean test of a value _immediately_ following another boolean test, when it has no ..." to this

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: I missed a "no" in the above, which somewhat changed the meaning! It should have read: "The implementation is allowed to skip any boolean test of a value, when it has *no* effect on the flow of the program and at least one test has already been performed on

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: The problem with using a specific syntax example, is that the optimizer doesn't work that way. It works on the CFG. Any specification needs to be phrased in terms of general control flow, as other optimizations can enable this transformation. e.g. if x or

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34705] Python 3.8 changes how returns through finally clauses are traced

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: In master, the sequence of events is: 1 call 2 line 3 line returning 4 line 6 line finally 6 return which is the same as 3.7. I now believe this is the correct trace, as the language spec states: When a return, break or continue statement is executed in the

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +23039 pull_request: https://github.com/python/cpython/pull/24212 ___ Python tracker ___

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23038 pull_request: https://github.com/python/cpython/pull/24211 ___ Python tracker

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 61d8c54f43a7871d016f98b38f86858817d927d5 by Tobias Holl in branch 'master': bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) https://github.com/python/cpython/commit/61d8c54f43a7871d016f98b38f86858817d927d5 -- nosy:

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: Is anyone still in favor of eliminating the __bool__ call from ‘if p: pass’? -- ___ Python tracker ___

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
Christian Gollwitzer wrote: > Am 13.01.21 um 06:24 schrieb Greg Ewing: >> On 13/01/21 4:18 am, Grant Edwards wrote: >> >>> AFAIK, Python can't be used to write device drivers for any popular OS >> >> At least not until some crazy person embeds Python in the >> Linux kernel... > > > What do you

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grimble
On 11/01/2021 20:37, DonK wrote: Hi, I'm thinking about learning Python but I'm 74 years old and will very likely not ever have a programming job again. At 83, I have no intention of having a programming job again! I last coded something professionally 45 years ago, but it hasn't lost its

conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
Chris Angelico wrote: ...projects that fade... > That's not really something Python can ever control, but I can say > with some confidence that the big libraries like Qt and GTK are going > to adapt, one way or another. And perhaps more importantly: Neither > input()/print() nor web applications

[issue2506] Add mechanism to disable optimizations

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: In general, it is hard to define what is an optimization, and what is part of the compiler. The original request was to disable optimizations that changed observable behavior w.r.t. line numbers. All optimizations now respect line numbers, so proposed

[issue42926] Split compiler into code-gen, optimizer and assembler.

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM. But I’m not the one who has to work with it. -- nosy: +gvanrossum ___ Python tracker ___

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Pablo, are you OK closing this without a 3.8 backport? I would be supportive, but we should check with Łukasz as he is the release manager of 3.8 -- ___ Python tracker

[issue42693] "if 0:" lines are traced; they didn't use to be

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Unless anyone objects, I'm going to close this issue. -- ___ Python tracker ___ ___

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Steve Stagg
Steve Stagg added the comment: Oops, sorry, didn't realise there were such rules. The reasoning for me making the change to the title is that that the original PR didn't mention skipping actual condition logic, but does mention skipping unreachable blocks, with the examples provided

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Pablo, are you OK closing this without a 3.8 backport? -- ___ Python tracker ___ ___

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grimble
On 11/01/2021 20:37, DonK wrote: So, what do you folks use Python for? I've written a shopping list script with auto-completion and a couple of web-scraping applications that support a weather reporting application interfacing with various 1Wire sensors transcribed from an initial Ruby

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Mark Shannon
Change by Mark Shannon : -- title: Is it legal to eliminate tests of a value, when that test has no effect on control flow -> Is it legal to eliminate tests of a value, when that test has no effect on control flow? ___ Python tracker

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Steve, Please don't change the title of the issue. Sure, the optimizer is "inconsistent". Optimizations are applied in some cases, and not in others. That's just how compilers work. The issue here is whether the optimizer is allowed to skip the call to

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: There were additional merge conflicts when I tried to create a manual 3.8 backport, more significant than the 3.9 ones IIRC. -- ___ Python tracker

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use NULL. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Does this need backporting to 3.8, or is 3.9 sufficient? -- ___ Python tracker ___ ___

[issue42914] pprint numbers with underscore

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> format(10**9, '_d') '1_000_000_000' -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue42926] Split compiler into code-gen, optimizer and assembler.

2021-01-13 Thread Mark Shannon
New submission from Mark Shannon : Currently the compiler operates in three main passes: Code-gen Optimize Assemble The problem is that these passes use the same basic-block based CFG, leading to unnecessary coupling and inefficiencies. A basic block CFG is awkward and error-prone for the

[issue42856] ensurepip: add configure --with-wheel-pkg-dir=PATH to get wheel packages from a system directory

2021-01-13 Thread Miro Hrončok
Miro Hrončok added the comment: In Fedora, we update the wheels independently without rebuilding Python. What incredible convoluted constructs do you have in mind in particular? -- ___ Python tracker

[issue42856] ensurepip: add configure --with-wheel-pkg-dir=PATH to get wheel packages from a system directory

2021-01-13 Thread Matej Cepl
Matej Cepl added the comment: We (SUSE) have updated versions of the wheels as special Sources, and then this in the %prep stage of our SPEC file: # Replace bundled wheels with the updates ones rm -v Lib/ensurepip/_bundled/*.whl cp -v %{SOURCE20} %{SOURCE21}

[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: That said, you can always use TracebackException.from_exception(exc, capture_locals=True).format() which is not much longer than print_exception(exc, capture_locals=True) -- ___ Python tracker

[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: Sorry, I spoke too soon - see now that the locals are use in the StackSummary.format(). -- ___ Python tracker ___

[issue42856] ensurepip: add configure --with-wheel-pkg-dir=PATH to get wheel packages from a system directory

2021-01-13 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: I don't understand this request. If you ask TracebackExceptions to capture_locals then the FrameSummary object gets a dict of the reprs of the locals, which can be introspected and participate in __eq__ checks but nothing else happens with them. What would

[issue42856] ensurepip: add configure --with-wheel-pkg-dir=PATH to get wheel packages from a system directory

2021-01-13 Thread STINNER Victor
STINNER Victor added the comment: > For simplicity, I would avoid mixing wheels from 2 different directories. Right. I wrote PR 24210 which is simpler. It either uses bundled wheels, or wheels from the directory. -- ___ Python tracker

[issue42856] ensurepip: add configure --with-wheel-pkg-dir=PATH to get wheel packages from a system directory

2021-01-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23037 pull_request: https://github.com/python/cpython/pull/24210 ___ Python tracker ___

[issue42908] Incorrect line numbers at end of try-except and with statements containing if False: pass

2021-01-13 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23036 pull_request: https://github.com/python/cpython/pull/24209 ___ Python tracker ___

[issue42922] Enlace a descripción de función 'dir' faltante

2021-01-13 Thread Mariatta
Mariatta added the comment: Hi, the Spanish translation for Python docs is managed at https://github.com/python/python-docs-es Can you please open the issue there? Thanks you. Really sorry that I don't speak Spanish :( so I'm replying in English. -- nosy: +Mariatta resolution: ->

[issue42877] TracebackException saves more data than it needs for format

2021-01-13 Thread Irit Katriel
Change by Irit Katriel : -- title: TracebackException saves more data than it needs -> TracebackException saves more data than it needs for format ___ Python tracker ___

[ANN] PyInstaller 4.2

2021-01-13 Thread Hartmut Goebel
Hello, on behalf of the PyInstaller development team I'm happy to announce PyInstaller 4.2. http://www.pyinstaller.org Thanks for all those who contributed questions, bug-reports or pull-requests. PyInstaller is in urgent need of funding to make future

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread tholl
Change by tholl : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42914] pprint numbers with underscore

2021-01-13 Thread Eric V. Smith
Eric V. Smith added the comment: +1 also. I agree with Raymond it should be optional. -- nosy: +eric.smith ___ Python tracker ___

[issue42925] Error trace of else inside class

2021-01-13 Thread ChenXuan
ChenXuan <522169...@qq.com> added the comment: another example: if 1 < 10: b = 1 if 0: a = 1 else: a = 1 output: 1: if 1 < 10: 1: b = 1 1: if 0: 1: a = 1 else: a = 1 Is this a bug or feature? --

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +23035 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24208 ___ Python tracker

[issue42925] Error trace of else inside class

2021-01-13 Thread ChenXuan
New submission from ChenXuan <522169...@qq.com>: Hi, python3.10 seems to give wrong trace here: class A: if 3 < 9: a = 1 else: a = 2 result: 2: class A: 1:if 3 < 9: 1: a = 1 else: 1: a = 2 command: python3.10 -m trace --count

[issue42908] Incorrect line numbers at end of try-except and with statements containing if False: pass

2021-01-13 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

  1   2   >