[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Glenn Linderman
On 4/29/2022 11:42 AM, Stephen J. Turnbull wrote: MRAB writes: > On 2022-04-29 18:02, Guido van Rossum wrote: > > On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin > > wrote: > > > > On 29. 04. 22 16:32, Victor Stinner wrote: > > > Ok, let me start with

[Python-Dev] Re: PEP 646 (Variadic Generics): final call for comments

2022-01-18 Thread Glenn Linderman
On 1/18/2022 2:35 PM, Jim J. Jewett wrote: The problem is that [*s3, *s4] = (a, b, 1, 2, 3) is ambiguous ... It wouldn't have to be... but as you say, it needs to be explicit. *s3 could get all the content, and *s4 a tuple with no members. ___

[Python-Dev] Re: Suggestion: a little language for type definitions

2022-01-08 Thread Glenn Linderman
On 1/8/2022 2:05 PM, Skip Montanaro wrote: > ... make sense of what they’re reading. Some of us have that problem with type-embellished code now.I'm not sure a little language would be such a bad idea. 樂Fortunately, my relationship to the working world allows me to simply ignore explicit

[Python-Dev] Re: PEP 654 except* formatting

2021-10-04 Thread Glenn Linderman
On 10/3/2021 10:23 PM, Guido van Rossum wrote: On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble wrote: Therefore my vote is for requiring `except* E` and keeping `except *E` as a SyntaxError. You can't do that with our current lexer+parser. Seems like a good reason to promote  

[Python-Dev] Re: Roundup to GitHub Issues migration

2021-06-22 Thread Glenn Linderman
On 6/22/2021 12:52 PM, Brett Cannon wrote: On Mon, Jun 21, 2021 at 4:09 PM Glenn Linderman <mailto:v%2bpyt...@g.nevcal.com>> wrote: On 6/21/2021 2:31 PM, Christopher Barker wrote: By contrast, requiring a github account for reporting bugs also makes

[Python-Dev] Re: Roundup to GitHub Issues migration

2021-06-21 Thread Glenn Linderman
On 6/21/2021 2:31 PM, Christopher Barker wrote: By contrast, requiring a github account for reporting bugs also makes python an unwelcoming place for non-developers in general. Github is a developers' social network, "mere" users are much less likely to want to be part of

[Python-Dev] Re: Proposal: declare "unstable APIs"

2021-06-03 Thread Glenn Linderman
On 6/3/2021 3:34 PM, Guido van Rossum wrote: On Thu, Jun 3, 2021 at 3:17 PM Tim Delaney mailto:timothy.c.dela...@gmail.com>> wrote: Perhaps "living API" analogous to "living document". Much more positive connotations ... Perhaps, but that's pretty much coining a new term, which we

[Python-Dev] Re: name for new Enum decorator

2021-06-02 Thread Glenn Linderman
On 6/2/2021 7:59 PM, Ethan Furman wrote: On 5/27/21 8:24 PM, Ethan Furman wrote: > So, like the enum.unique decorator that can be used when duplicate names should be an error, > I'm adding a new decorator to verify that a Flag has no missing aliased values that can be > used when the

[Python-Dev] Re: name for new Enum decorator

2021-05-31 Thread Glenn Linderman
On 5/31/2021 1:37 PM, Luciano Ramalho wrote: On Fri, May 28, 2021 at 7:00 PM Joao S. O. Bueno wrote: "check_all_bits_defined" or something along it. Best suggestion so far. Similar: "ensure_all_bits_named" I am all for brainstorming, as we've been doing for a few days. Maybe we need to

[Python-Dev] Re: name for new Enum decorator

2021-05-29 Thread Glenn Linderman
On 5/29/2021 6:33 PM, Nick Coghlan wrote: On Sat, 29 May 2021, 7:27 am Ethan Furman, > wrote: On 5/28/21 12:43 AM, Petr Viktorin wrote:  > On 28. 05. 21 5:24, Ethan Furman wrote:  >>      class FlagWithMasks(IntFlag):  >>          DEFAULT = 0x0  

[Python-Dev] Re: name for new Enum decorator

2021-05-28 Thread Glenn Linderman
On 5/28/2021 12:08 AM, Michał Górny wrote: On Thu, 2021-05-27 at 20:24 -0700, Ethan Furman wrote: Greetings! The Flag type in the enum module has had some improvements, but I find it necessary to move one of those improvements into a decorator instead, and I'm having a hard time thinking up a

[Python-Dev] Re: Should Python typing leverage PEP 263 as a pre-processor step?

2021-04-19 Thread Glenn Linderman
On 4/19/2021 12:44 PM, Guido van Rossum wrote: We had a similar thing at Dropbox, where `# coding: pyxl` would enable a preprocessor that allowed HTML embedded in the Python code. It translated this to function calls and string literals. There were however several drawbacks: - Installing the

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-04 Thread Glenn Linderman
On 3/4/2021 1:41 AM, Irit Katriel wrote: On Thu, Mar 4, 2021 at 1:38 AM Glenn Linderman <mailto:v%2bpyt...@g.nevcal.com>> wrote: On 3/3/2021 2:49 PM, Irit Katriel via Python-Dev wrote: That's an interesting idea. Do you mean that one exception gets handled and

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Glenn Linderman
On 3/3/2021 2:49 PM, Irit Katriel via Python-Dev wrote: On Wed, Mar 3, 2021 at 10:39 PM Greg Ewing mailto:greg.ew...@canterbury.ac.nz>> wrote: On 4/03/21 5:37 am, Paul Moore wrote: > frameworks and libraries typically have to interact with other users' > code, and there the

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-25 Thread Glenn Linderman
On 2/25/2021 9:40 PM, Nathaniel Smith wrote: On Thu, Feb 25, 2021 at 2:13 PM Guido van Rossum wrote: So is "fail-fast if you forget to handle an ExceptionGroup" really a feature? (Do we call this out in the PEP?) We may believe that "except Exception" is an abuse, but it is too common to

[Python-Dev] Re: __init_subclass__ and metaclasses

2020-12-29 Thread Glenn Linderman
On 12/29/2020 10:00 PM, Guido van Rossum wrote: I need to think about this more. Both techniques could coexist. Technically the class *is* created at the point `__init_subclass__` is called. What the metaclass does after that point is embellishment. Most metaclasses will have sufficient

[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-21 Thread Glenn Linderman
On 11/21/2020 9:47 AM, David Mertz wrote: So in my mind, if I had the choice, it is a decision between a sigil and a word to indicate "no, really use this name as a value!" I like a word better, but none of the current keywords really make sense, so it would need to be a new word. I suggested

[Python-Dev] Re: PEP 642 v2: Explicit constraint patterns *without* question marks in the syntax

2020-11-16 Thread Glenn Linderman
On 11/15/2020 11:18 PM, Stephen J. Turnbull wrote: Jim J. Jewett writes: > What advantage can there be in re-using syntax to mean something > opposite to what it normally does? In math, it allows us to write "solve c = f(x) for x". That doesn't mean "bind c to the value f(x)", it means

[Python-Dev] Re: PEP 642 v2: Explicit constraint patterns *without* question marks in the syntax

2020-11-13 Thread Glenn Linderman
On 11/13/2020 1:48 PM, Joao S. O. Bueno wrote: On Fri, 13 Nov 2020 at 17:36, Jim J. Jewett > wrote: I *hope* this was a typo!  If     case Point(x=a, y=b): assigns to a and b (instead of x and y, as in a normal call), then that is ... going to

[Python-Dev] Re: PEP 642: Constraint Pattern Syntax for Structural Pattern Matching

2020-11-02 Thread Glenn Linderman
On 11/2/2020 1:42 PM, Guido van Rossum wrote: But we feel that `case x, x` can easily be misunderstood as "a tuple of two equal values" So what _is_ the syntax for "a tuple of two equal values" ? case x, ?x:  # comes to mind (not that it is in the PEP :))

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-07-16 Thread Glenn Linderman
On 7/16/2020 10:00 AM, Rhodri James wrote: On 16/07/2020 17:37, Steve Holden wrote: While I understand the point of view that says that match ... : should encapsulate a sequence of indented suites, it seems to me that match/case/case/.../else has a natural affinity with

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-07-11 Thread Glenn Linderman
On 7/11/2020 10:36 AM, Jim J. Jewett wrote: Glenn Linderman wrote: On 7/10/2020 3:15 AM, Gustavo Carneiro wrote: ... Therefore, I posit that the style of try...except indentation only works where the number of cases is small. But for the case of pattern matching, I expect the number of cases

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-07-10 Thread Glenn Linderman
On 7/10/2020 3:15 AM, Gustavo Carneiro wrote: On Fri, 10 Jul 2020 at 10:33, Glenn Linderman <mailto:v%2bpyt...@g.nevcal.com>> wrote: On 7/10/2020 1:21 AM, Stefano Borini wrote: > Just my 2 cents, I find it kind of annoying that the whole structure > requ

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-07-10 Thread Glenn Linderman
On 7/10/2020 1:21 AM, Stefano Borini wrote: Just my 2 cents, I find it kind of annoying that the whole structure requires two levels of indentation to actually reach the operational code. This would be a first in python. I would prefer an option akin to if elif elif else where each block is

[Python-Dev] Re: Recent PEP-8 change

2020-07-02 Thread Glenn Linderman
On 7/2/2020 7:39 AM, Tim Peters wrote: Then again, we're talking about humans. There's nothing you can do - or refrain from doing - that won't mortally offend someone:-) This is the truest thing spoken in this whole thread. ___ Python-Dev mailing

[Python-Dev] Re: Plan to remove Py_UNICODE APis except PEP 623.

2020-07-01 Thread Glenn Linderman
On 7/1/2020 1:20 PM, M.-A. Lemburg wrote: As an example application, think of a database module which provides the Unicode data as Py_UNICODE buffer. You want to write this as UTF-8 data to a file or a socket, so you have the PyUnicode_EncodeUTF8() API decode this for you into a bytes object

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-24 Thread Glenn Linderman
On 6/24/2020 1:49 PM, Tim Peters wrote: ".NAME" grated at first, but extends the idea that dotted names are always constant value patterns to "if and only if". So it has mnemonic value. When context alone can't distinguish whether a name is meant as (in effect) an lvalue or an rvalue, no syntax

[Python-Dev] Re: PEP 554 for 3.9 or 3.10?

2020-04-22 Thread Glenn Linderman
On 4/21/2020 10:26 PM, Greg Ewing wrote: And if I understand correctly, you won't get any nice "This module does not support subinterpreters" exception if you import an incompatible module -- just an obscure crash, probably of the core-dumping variety. This sounds fixable: modules that

[Python-Dev] Re: Improvement to SimpleNamespace

2020-04-15 Thread Glenn Linderman
On 4/15/2020 2:57 PM, Ivan Pozdeev via Python-Dev wrote: On 16.04.2020 0:34, Glenn Linderman wrote: On 4/15/2020 12:47 PM, Ivan Pozdeev via Python-Dev wrote: When writing a proof-of-concept implementation, however, I bumped into the need to distinguish which of the child objects

[Python-Dev] Re: Improvement to SimpleNamespace

2020-04-15 Thread Glenn Linderman
On 4/15/2020 12:47 PM, Ivan Pozdeev via Python-Dev wrote: When writing a proof-of-concept implementation, however, I bumped into the need to distinguish which of the child objects are containers (thus need to be wrapped as well) and which are the leaves (thus need to be returned as is). I

[Python-Dev] Re: Improvement to SimpleNamespace

2020-04-15 Thread Glenn Linderman
On 4/14/2020 10:09 PM, Cameron Simpson wrote: On 14Apr2020 21:25, Guido van Rossum wrote: On Tue, Apr 14, 2020 at 9:08 PM Raymond Hettinger < raymond.hettin...@gmail.com> wrote: [GvR] > We should not try to import JavaScript's object model into Python. Yes, I get that.  Just want to

[Python-Dev] Re: Improvement to SimpleNamespace

2020-04-14 Thread Glenn Linderman
On 4/14/2020 9:25 PM, Guido van Rossum wrote: On Tue, Apr 14, 2020 at 9:08 PM Raymond Hettinger mailto:raymond.hettin...@gmail.com>> wrote: [GvR] > We should not try to import JavaScript's object model into Python. Yes, I get that.  Just want to point-out that working with heavily

[Python-Dev] Re: Are PyObject_RichCompareBool shortcuts part of Python or just CPython quirks?

2020-02-03 Thread Glenn Linderman
On 2/3/2020 6:21 PM, Chris Angelico wrote: Hmm, true, although that's equivalent only in one specific situation. In mathematics, "congruent" means that two things are functionally equivalent (eg triangles with the same length sides; in programming terms we'd probably say that two such triangles

[Python-Dev] Re: Parameters of str(), bytes() and bytearray()

2019-12-16 Thread Glenn Linderman
On 12/16/2019 12:05 AM, Kyle Stanley wrote: Chris Angelico wrote: > ANY object can be passed to str() in order to get some sort of valid > printable form. The awkwardness comes from the fact that str() > performs double duty - it's both "give me a printable form of this > object" and "decode

[Python-Dev] Re: [RELEASE] Python 3.8.0 is now available

2019-10-15 Thread Glenn Linderman
On 10/15/2019 11:03 AM, MRAB wrote: On 2019-10-14 21:23, Łukasz Langa wrote: On behalf of the Python development community and the Python 3.8 release team, I’m pleased to announce *the availability of Python 3.8.0*. [snip] I've installed pywin32 on Python 3.8, but when I try to import

[Python-Dev] Re: [RELEASE] Python 3.8.0 is now available

2019-10-15 Thread Glenn Linderman
On 10/14/2019 9:26 PM, Glenn Linderman wrote: On 10/14/2019 1:23 PM, Łukasz Langa wrote: On behalf of the Python development community and the Python 3.8 release team, I’m pleased to announce the availability of Python 3.8.0. I look forward to using Python 3.8.0. However, having installed

[Python-Dev] Re: Python for Windows (python-3.7.4.exe) location confusing

2019-09-09 Thread Glenn Linderman
On 9/9/2019 2:48 AM, Steve Dower wrote: User with administrative privileges are by implication better able to handle decisions such as this. If they are not, they should not be administrating a machine. Most home machines are administered by people that should not be "administrating" a

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-15 Thread Glenn Linderman
On 8/15/2019 4:17 AM, Petr Viktorin wrote: On 8/15/19 10:40 AM, Greg Ewing wrote: If we want a truly raw string format that allows all characters, including any kind of quote, we could take a tip from Fortran: s = 31HThis is a "totally raw" string! Or from Rust: let s = r"Here's a raw

[Python-Dev] Re: An f-string issue [Was: Re: Re: What to do about invalid escape sequences]

2019-08-14 Thread Glenn Linderman
On 8/14/2019 8:09 AM, Random832 wrote: On Sat, Aug 10, 2019, at 19:54, Glenn Linderman wrote: Because of the "invalid escape sequence" and "raw string" discussion, when looking at the documentation, I also noticed the following description for f-strings: Escape sequen

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-14 Thread Glenn Linderman
On 8/14/2019 8:02 AM, Random832 wrote: On Mon, Aug 12, 2019, at 15:15, Terry Reedy wrote: Please no more combinations. The presence of both legal and illegal combinations is already a mild nightmare for processing and testing. idlelib.colorizer has the following re to detest legal combinations

[Python-Dev] Re: Raw string literals and trailing backslash

2019-08-13 Thread Glenn Linderman
On 8/12/2019 10:21 PM, Serhiy Storchaka wrote: 12.08.19 22:41, Glenn Linderman пише: On 8/12/2019 12:08 AM, Serhiy Storchaka wrote: Currently a raw literal cannot end in a single backslash (e.g. in r"C:\User\"). Although there are reasons for this. It is an old gotcha, and ther

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-12 Thread Glenn Linderman
On 8/12/2019 12:11 AM, Serhiy Storchaka wrote: 11.08.19 23:07, Glenn Linderman пише: On 8/11/2019 1:26 AM, Serhiy Storchaka wrote: 10.08.19 22:10, Glenn Linderman пише: I wonder how many raw strings actually use the \"  escape productively? Maybe that should be deprecated too! ?  I

[Python-Dev] Re: Raw string literals and trailing backslash

2019-08-12 Thread Glenn Linderman
On 8/12/2019 12:08 AM, Serhiy Storchaka wrote: Currently a raw literal cannot end in a single backslash (e.g. in r"C:\User\"). Although there are reasons for this. It is an old gotcha, and there are many closed issues about it. This question is even included in FAQ. Hmm. I didn't find it

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-12 Thread Glenn Linderman
On 8/11/2019 8:40 PM, Eric V. Smith wrote: On 8/11/2019 4:18 PM, Glenn Linderman wrote: On 8/11/2019 2:50 AM, Steven D'Aprano wrote: On Sat, Aug 10, 2019 at 12:10:55PM -0700, Glenn Linderman wrote: Or invent "really raw" in some spelling, such as rr"c:\directory\"

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-11 Thread Glenn Linderman
On 8/11/2019 2:50 AM, Steven D'Aprano wrote: On Sat, Aug 10, 2019 at 12:10:55PM -0700, Glenn Linderman wrote: Or invent "really raw" in some spelling, such as rr"c:\directory\" or e for exact, or x for exact, or "c:\directory\" And that brings me to the thought

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-11 Thread Glenn Linderman
On 8/11/2019 1:26 AM, Serhiy Storchaka wrote: 10.08.19 22:10, Glenn Linderman пише: As pointed out elsewhere, Raw strings have limitations, paths ending in \ cannot be represented, and such do exist in various situations, not all of which can be easily avoided... except by the "

[Python-Dev] Re: An f-string issue [Was: Re: Re: What to do about invalid escape sequences]

2019-08-10 Thread Glenn Linderman
On 8/10/2019 5:32 PM, Greg Ewing wrote: Glenn Linderman wrote: If that were true, the \n in the above example would already be a newline character, and the parsing of the format expression would not see the backslash. And if it were true, that would actually be far more useful

[Python-Dev] An f-string issue [Was: Re: Re: What to do about invalid escape sequences]

2019-08-10 Thread Glenn Linderman
Because of the "invalid escape sequence" and "raw string" discussion, when looking at the documentation, I also noticed the following description for f-strings: Escape sequences are decoded like in ordinary string literals (except when a literal is also marked as a raw string). After

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-10 Thread Glenn Linderman
On 8/10/2019 3:36 PM, Greg Ewing wrote: Glenn Linderman wrote: I wonder how many raw strings actually use the \"  escape productively? Maybe that should be deprecated too! ?  I can't think of a good and necessary use for it, can anyone? Quite rare, I expect, but it's bound to

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-10 Thread Glenn Linderman
On 8/10/2019 12:19 PM, Guido van Rossum wrote: Regular expressions. I assume that is in response to the "good use for \" escape" question? But can't you just surround them with ' instead of " ?  Or  ''' ? On Sat, Aug 10, 2019 at 12:12 Glenn Linderman <mailto:v%2bpyt.

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-10 Thread Glenn Linderman
On 8/10/2019 11:16 AM, Terry Reedy wrote: On 8/10/2019 4:33 AM, Paul Moore wrote: (Side issue) This deserves its own thread. As a Windows developer, who has seen far too many cases where use of slashes in filenames implies a Unix-based developer not thinking sufficiently about Windows

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-10 Thread Glenn Linderman
On 8/10/2019 7:03 AM, Paul Moore wrote: On Sat, 10 Aug 2019 at 12:06, Chris Angelico wrote: On Sat, Aug 10, 2019 at 6:39 PM Paul Moore wrote: There are *many* valid ways to write Windows pathnames in your code: 1. Raw strings 2. Doubling the backslashes 3. Using pathlib (possibly with slash

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-09 Thread Glenn Linderman
, Aug 09, 2019 at 03:18:29PM -0700, Glenn Linderman wrote: On 8/9/2019 2:53 PM, Steven D'Aprano wrote: On Fri, Aug 09, 2019 at 01:12:59PM -0700, Glenn Linderman wrote: The reason I never use raw strings is in the documentation, it is because \ still has a special meaning, and the first several

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-09 Thread Glenn Linderman
On 8/9/2019 4:08 PM, MRAB wrote: On 2019-08-09 23:56, Steven D'Aprano wrote: I'm not trying to be confrontational, I'm trying to understand your use-case(s) and see if it would be broken by the planned change to string escapes. On Fri, Aug 09, 2019 at 03:18:29PM -0700, Glenn Linderman wrote

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-09 Thread Glenn Linderman
On 8/9/2019 4:07 PM, Gregory P. Smith wrote: On Fri, Aug 9, 2019 at 11:37 AM Eric V. Smith > wrote: On 8/9/2019 2:28 PM, Jonathan Goble wrote: > On Fri, Aug 9, 2019 at 12:34 PM Nick Coghlan mailto:ncogh...@gmail.com>> wrote: >> I find the "Our

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-09 Thread Glenn Linderman
On 8/9/2019 2:53 PM, Steven D'Aprano wrote: On Fri, Aug 09, 2019 at 01:12:59PM -0700, Glenn Linderman wrote: The reason I never use raw strings is in the documentation, it is because \ still has a special meaning, and the first several times I felt the need for raw strings

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-09 Thread Glenn Linderman
On 8/9/2019 9:08 AM, Nick Coghlan wrote: On Sat, 10 Aug 2019 at 01:44, Guido van Rossum wrote: This discussion looks like there's no end in sight. Maybe the Steering Council should take a vote? I find the "Our deprecation warnings were even less visible than normal" argument for extending

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-08 Thread Glenn Linderman
On 8/7/2019 6:13 PM, raymond.hettin...@gmail.com wrote: This isn't about me. As a heavy user of the 3.8 beta, I'm just the canary in the coal mine. Are you, with an understanding of the issue, submitting bug reports on the issues you find, thus helping to alleviate the problem, and educate

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-06 Thread Glenn Linderman
On 8/6/2019 5:57 PM, Gregory P. Smith wrote: People distribute code via pypi.  if we reject uploads of packages with these problems and link to fixers (modernize can be taught what to do), we prevent them from spreading further.  A few years after doing that, we can revisit how much pain and

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-07-02 Thread Glenn Linderman
On 7/2/2019 12:56 PM, Terry Reedy wrote: On 7/2/2019 12:16 AM, Glenn Linderman wrote: On 7/1/2019 8:28 PM, Terry Reedy wrote: I did not read much of the thread, but the proposal is to wrap a near-trivial expression (2 operations) or replace a current method call with a method call than

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-07-01 Thread Glenn Linderman
On 7/1/2019 8:28 PM, Terry Reedy wrote: On 7/1/2019 1:57 PM, Chris Barker via Python-Dev wrote: This was quite extensively discussed on python-ideas recently: https://mail.python.org/archives/list/python-id...@python.org/thread/RJARZSUKCXRJIP42Z2YBBAEN5XA7KEC3/#WIRID57ESUFUAQQQ6ZUY2RK5PKQQYSJ3

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-28 Thread Glenn Linderman
On 6/28/2019 10:10 AM, MRAB wrote: On 2019-06-28 03:40, Glenn Linderman wrote: On 6/27/2019 3:09 PM, Brett Cannon wrote: My guess is that without Guido to just ask this will have to go to a PEP as it changes a built-in. How does adding two new methods change a built-in? Now if an extra

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Glenn Linderman
On 6/27/2019 3:09 PM, Brett Cannon wrote: My guess is that without Guido to just ask this will have to go to a PEP as it changes a built-in. How does adding two new methods change a built-in? Now if an extra parameter were added to modify lstrip, rstrip, and strip to make them do something

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-05-27 Thread Glenn Linderman
On 5/27/2019 7:28 PM, Steven D'Aprano wrote: On the other hand, locals() currently returns a dict everywhere. It might be surprising for it to start returning a proxy object inside functions instead of a dict. I thought the proxy object sounded more useful... how different is it in use from a

Re: [Python-Dev] PEP 594: update 1

2019-05-24 Thread Glenn Linderman
On 5/24/2019 9:09 PM, Random832 wrote: On Thu, May 23, 2019, at 15:27, Steve Holden wrote: Besides which, it would be lovely to have a major release that didn't involve any pain at all for the majority of users! Our erstwhile BDFL always eschewed two-digit version identifiers- due to the

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-22 Thread Glenn Linderman
On 5/22/2019 4:09 AM, Christian Heimes wrote: On 22/05/2019 01.11, Glenn Linderman wrote: On 5/21/2019 2:00 PM, Nathaniel Smith wrote: On Tue, May 21, 2019 at 10:43 AM Glenn Linderman wrote: After maintaining my own version of http.server to fix or workaround some of its deficiencies

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-22 Thread Glenn Linderman
Between this discussion and Steve Dower's recently referenced blog post at https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/from which I quote below: It’s been widely known for many years that Windows is the only mainstream operating system that does not include

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-21 Thread Glenn Linderman
On 5/21/2019 2:00 PM, Nathaniel Smith wrote: On Tue, May 21, 2019 at 10:43 AM Glenn Linderman wrote: After maintaining my own version of http.server to fix or workaround some of its deficiencies for some years, I discovered bottle.py. It has far more capability, is far better documented

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-21 Thread Glenn Linderman
On 5/21/2019 11:15 AM, Christian Heimes wrote: On 21/05/2019 18.29, Glenn Linderman wrote: On 5/20/2019 2:20 PM, Christian Heimes wrote: On 20/05/2019 23.12, Andrew Svetlov wrote: socketserver.py is also questionable I briefly though about the module, but didn't consider it for removal

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-21 Thread Glenn Linderman
is a disservice to novice users, because they might try to use it for something real. On Tue, May 21, 2019 at 9:39 AM Glenn Linderman <mailto:v%2bpyt...@g.nevcal.com>> wrote: On 5/20/2019 2:20 PM, Christian Heimes wrote: On 20/05/2019 23.12, Andrew Svetlov wrote: socketserver.p

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-21 Thread Glenn Linderman
On 5/20/2019 2:20 PM, Christian Heimes wrote: On 20/05/2019 23.12, Andrew Svetlov wrote: socketserver.py is also questionable I briefly though about the module, but didn't consider it for removal. The http.server, xmlrpc.server, and logging configuration server are implemented on top of the

Re: [Python-Dev] Easier debugging with f-strings

2019-05-06 Thread Glenn Linderman
On 5/6/2019 5:39 PM, Eric V. Smith wrote: Last fall Larry Hastings made a suggestion for adding a way to make so-called "print-based debugging" easier with f-strings. Basically the approach is that f-strings would be able to produce the text of the expression and the value of that expression,

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-23 Thread Glenn Linderman
On 4/22/2019 10:59 PM, Steve Dower wrote: On 22Apr2019 2119, Glenn Linderman wrote: While Inada's suggested DictBuilder interface was immediately obvious, I don't get how either copy or update would achieve the goal. Perhaps you could explain? Particularly, what would be the trigger

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Glenn Linderman
On 4/22/2019 7:27 PM, Steve Dower wrote: On 22Apr2019 1921, Steve Dower wrote: On 22Apr2019 1822, Glenn Linderman wrote: Inada is now proposing a way to allow the coder to suggest a group of dictionaries that might benefit from the same gains, by preclassifying non-__dict__ slot dictionaries

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Glenn Linderman
On 4/22/2019 7:27 PM, Steve Dower wrote: On 22Apr2019 1921, Steve Dower wrote: On 22Apr2019 1822, Glenn Linderman wrote: Inada is now proposing a way to allow the coder to suggest a group of dictionaries that might benefit from the same gains, by preclassifying non-__dict__ slot dictionaries

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Glenn Linderman
On 4/22/2019 5:19 PM, Steven D'Aprano wrote: Oh, you mean just like regular dicts with shared keys already do:-) https://www.python.org/dev/peps/pep-0412/ Perhaps I've missed something in this discussion, but isn't this a matter of just making the existing shared-keys functionality explicitly

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Glenn Linderman
On 4/22/2019 4:03 PM, Inada Naoki wrote: On Tue, Apr 23, 2019 at 2:18 AM Chris Barker via Python-Dev wrote: On Fri, Apr 12, 2019 at 10:20 AM Brett Cannon wrote: This doesn't strike me as needing an optimization through a dedicated method. maybe a new dict mapping type -- "shared_dict" --

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-20 Thread Glenn Linderman
On 4/20/2019 2:08 PM, Inada Naoki wrote: "import typing" is slow too. 2019年4月21日(日) 1:43 Ilya Kamenshchikov >: alright, so would an import under TYPE_CHECKING guard be an option? like: from typingimport TYPE_CHECKING if TYPE_CHECKING:

Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality

2019-03-11 Thread Glenn Linderman
On 3/11/2019 4:35 PM, Giampaolo Rodola' wrote: Hello, some time ago I contributed a couple of patches to speedup shutil.copy*() functions: https://bugs.python.org/issue33671 https://bugs.python.org/issue33695 I would like to backport both functionalities so that they can be used on Python 2.7

Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Glenn Linderman
On 2/28/2019 2:52 PM, Terry Reedy wrote: On 2/28/2019 5:38 PM, Glenn Linderman wrote: On 2/28/2019 2:18 PM, Jonathan Goble wrote: On Thu, Feb 28, 2019, 5:11 PM Terry Reedy <mailto:tjre...@udel.edu>> wrote:     On 2/28/2019 8:07 AM, Jonathan Goble wrote:     > On Thu, Feb 28, 2

Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Glenn Linderman
On 2/28/2019 2:18 PM, Jonathan Goble wrote: On Thu, Feb 28, 2019, 5:11 PM Terry Reedy > wrote: On 2/28/2019 8:07 AM, Jonathan Goble wrote: > On Thu, Feb 28, 2019, 8:02 AM INADA Naoki mailto:songofaca...@gmail.com> >

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-30 Thread Glenn Linderman
On 1/30/2019 8:45 PM, Raymond Hettinger wrote: On Jan 30, 2019, at 3:41 PM, Glenn Linderman wrote: Would it be practical to add deprecated methods to regular dict for the OrderedDict reordering methods that raise with an error suggesting "To use this method, convert dict to Ordere

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-30 Thread Glenn Linderman
On 1/30/2019 2:32 PM, Raymond Hettinger wrote: Now that regular dicts are ordered and compact, it makes more sense for the _asdict() method to create a regular dict (as it did in its early days) rather than an OrderedDict. ... Option 4) Just make the change directly in 3.8,

Re: [Python-Dev] Inclusion of lz4 bindings in stdlib?

2018-11-30 Thread Glenn Linderman
On 11/29/2018 2:10 PM, Andrew Svetlov wrote: Neither http.client nor http.server doesn't support compression (gzip/compress/deflate) at all. I doubt if we want to add this feature: for client better to use requests or, well, aiohttp. The same for servers: almost any production ready web server

Re: [Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)

2018-11-20 Thread Glenn Linderman
On 11/20/2018 10:33 PM, Nathaniel Smith wrote: On Tue, Nov 20, 2018 at 6:05 PM Glenn Linderman wrote: On 11/20/2018 2:17 PM, Victor Stinner wrote: IMHO performance and hiding implementation details are exclusive. You should either use the C API with impl. details for best performances, or use

Re: [Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)

2018-11-20 Thread Glenn Linderman
On 11/20/2018 2:17 PM, Victor Stinner wrote: Le mar. 20 nov. 2018 à 23:08, Stefan Krah a écrit : Intuitively, it should probably not be part of a limited API, but I never quite understood the purpose of this API, because I regularly need any function that I can get my hands on. (...) Reading

Re: [Python-Dev] Need discussion for a PR about memory and objects

2018-11-19 Thread Glenn Linderman
On 11/19/2018 4:14 PM, Chris Barker via Python-Dev wrote: On Mon, Nov 19, 2018 at 1:41 AM Antoine Pitrou > wrote: I'd rather keep the reference to memory addressing than start doing car analogies in the reference documentation. I agree -- and any of the

Re: [Python-Dev] Standardize error message for non-pickleable types

2018-10-30 Thread Glenn Linderman
On 10/30/2018 1:12 AM, Serhiy Storchaka wrote: 29.10.18 23:17, MRAB пише: 1. If you're pickling, then saying "pickle" is more helpful. 2. In English the usual long form is "cannot". Error messages tend to avoid abbreviations, and also tend to have lowercase after the colon, e.g.:

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Glenn Linderman
On 10/29/2018 3:07 PM, Greg Ewing wrote: When I have a bug that only happens after hours of run time, I try to find a much shorter test case that reproduces it. Mmm. Yeah.  But that's often a guessing game, with a low chance of success. ___

Re: [Python-Dev] Standardize error message for non-pickleable types

2018-10-29 Thread Glenn Linderman
On 10/29/2018 12:51 PM, Victor Stinner wrote: Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka a écrit : 1. "pickle" or "serialize"? serialize 2. "can't", "Cannot", "can not" or "cannot"? cannot 3. "object" or "objects"? object 4. Use the "a" article or not? no: "cannot serialize xxx

Re: [Python-Dev] Arbitrary non-identifier string keys when using **kwargs

2018-10-09 Thread Glenn Linderman
On 10/9/2018 7:46 PM, Chris Jerdonek wrote: On Tue, Oct 9, 2018 at 7:13 PM Benjamin Peterson wrote: On Tue, Oct 9, 2018, at 17:14, Barry Warsaw wrote: On Oct 9, 2018, at 16:21, Steven D'Aprano wrote: On Tue, Oct 09, 2018 at 10:26:50AM -0700, Guido van Rossum wrote: My feeling is that

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-11 Thread Glenn Linderman
On 7/10/2018 11:14 PM, Stephen J. Turnbull wrote: Ivan Pozdeev via Python-Dev writes: > "One or more issues caused the setup to fail. Please fix the issues and > the retry setup. For more information see the log file . > > 0x80070661 - This installation package is not supported by this

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Glenn Linderman
On 7/9/2018 8:43 PM, Guido van Rossum wrote: An exception to this special case applies when the target name is the same as a loop control variable for a comprehension containing it. This is invalid.  This exception exists to rule out edge cases of the above scope rules as

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Glenn Linderman
On 7/9/2018 6:00 PM, Guido van Rossum wrote: This rule is included to simplify the choice for the user between an   assignment statements and an assignment expression -- there is no "statements" should not be plural in the above line. syntactic position where both are valid. An exception

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-07 Thread Glenn Linderman
On 7/6/2018 9:01 PM, Terry Reedy wrote: In any case, Python's comprehensions use an English-syntax version of extended set builder notation.  "In Python, the set-builder's braces are replaced with square brackets, parentheses, or curly braces, giving list, generator, and set objects,

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-06 Thread Glenn Linderman
On 7/6/2018 11:20 AM, Brett Cannon wrote: On Fri, 6 Jul 2018 at 08:52 Chris Barker - NOAA Federal via Python-Dev mailto:python-dev@python.org>> wrote: Are we just having fun here? Or might we actually start using a new naming convention for

Re: [Python-Dev] Slow down...

2018-05-07 Thread Glenn Linderman
On 5/7/2018 7:59 AM, Eric Snow wrote: On Sun, May 6, 2018 at 8:25 PM, Nick Coghlan wrote: I'm inclined to agree that a Python 3.8 PEP in the spirit of the PEP 3003 language moratorium could be a very good idea. Note that the PEP specifically applies to "syntax, semantics,

Re: [Python-Dev] A fast startup patch (was: Python startup time)

2018-05-05 Thread Glenn Linderman
On 5/5/2018 10:30 AM, Toshio Kuratomi wrote: On Fri, May 4, 2018, 7:00 PM Nathaniel Smith > wrote: What are the obstacles to including "preloaded" objects in regular .pyc files, so that everyone can take advantage of this without rebuilding

Re: [Python-Dev] Python startup time

2018-05-03 Thread Glenn Linderman
On 5/2/2018 8:56 PM, Gregory Szorc wrote: Nobody in the project is seriously talking about a complete rewrite in Rust. Contributors to the project have varying opinions on how aggressively Rust should be utilized. People who contribute to the C code, low-level primitives (like storage, deltas,

Re: [Python-Dev] (name := expression) doesn't fit the narrative of PEP 20

2018-04-27 Thread Glenn Linderman
On 4/27/2018 2:11 PM, Tim Peters wrote: That's easy: any time there's a long thread to which Guido has contributed at least twice, it will be seen as a Golden Opportunity to re-litigate every decision that's ever been made;-) You're getting pretty good at that QOTD thing, Tim :)

  1   2   3   4   5   6   7   >