Re: [Python-Dev] Add a "transformdict" to collections

2013-09-10 Thread Glenn Linderman
On 9/10/2013 8:54 AM, Janzert wrote: I intuitively expected, and I think most often would want, the first key to be held. My intuition matches yours, but my thoughts are that it should be changeable by specific request. ___ Python-Dev mailing list

Re: [Python-Dev] Offtopic: OpenID Providers

2013-09-10 Thread Glenn Linderman
On 9/10/2013 8:08 AM, Guido van Rossum wrote: Why do several posts in this thread have an Unsubscribe link that tries to unsubscribe me from the list? (I saw one by Glen, and another one by Donald Stufft.) Seems to be in all of them. Probably added by the mailing list software. Why don't you

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-10 Thread Glenn Linderman
On 9/10/2013 2:46 PM, Antoine Pitrou wrote: > >>Which reminds one - this class should obviously have a method for > >>retrivieng the original key value, given a matching key - > >> > >>d.canonical('foo') -> 'Foo' > > > >I don't know. Is there any use case? > >(sure, it is trivially implemented)

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-12 Thread Glenn Linderman
On 9/12/2013 8:40 AM, Antoine Pitrou wrote: Le Thu, 12 Sep 2013 08:05:44 -0700, Ethan Furman a écrit : On 09/12/2013 07:43 AM, Antoine Pitrou wrote: Yeah, so this is totally silly. What you're basically saying is "we don't need TransformDict since people can re-implement it themselves". No, w

Re: [Python-Dev] TransformDict (PEP 455) Naming

2013-09-16 Thread Glenn Linderman
On 9/15/2013 11:28 PM, anatoly techtonik wrote: Does anybody know if http://vote.python.org is already operational? I decided to start a separate thread for TransformDict name, because I want to change it. Current implementation of PEP 455 only touches dictionary keys and it is more narrow than

Re: [Python-Dev] License() release list is imcomplete; intentional?

2013-09-17 Thread Glenn Linderman
On 9/17/2013 10:51 AM, Guido van Rossum wrote: But only the PSF has the list of original contributors and their licenses. So can that list be made public, and available in multiple archives? ___ Python-Dev mailing list Python-Dev@python.org https://m

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-22 Thread Glenn Linderman
On 9/22/2013 9:29 PM, Guido van Rossum wrote: On Sunday, September 22, 2013, Nick Coghlan wrote: Brevity is still a virtue. The relevant C API function is called "PyErr_WriteUnraisable", so just starting the message as something like "Unraisable exception suppressed in..." might work

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-24 Thread Glenn Linderman
On 9/24/2013 5:51 AM, Nick Coghlan wrote: > Why not just say something like "Cannot propagate exception..."; it's > simpler than "Unpropagatable exception...". That would definitely be an improvement on the status quo and avoids Antoine's concern about an adjective being interpreted as an inhe

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-25 Thread Glenn Linderman
omething like "Uncaught exception in __del__ | > method ignored"? It explains fairly clearly what has | > happened, and also indicates what do do about it -- | > catch it in the __del__ method. | | "Exception in __del__ caught and not propagated:" | Georg On 24Sep20

Re: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters

2013-10-09 Thread Glenn Linderman
On 10/9/2013 7:45 AM, Anders J. Munch wrote: Larry Hastings wrote: > I look forward to an alternate suggestion. This is the least-bad > thing I could come up with. How about a naming convention instead, where using a leading underscore in a parameter name is a hint that it is positional-onl

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-11 Thread Glenn Linderman
On 10/11/2013 10:19 AM, Eric V. Smith wrote: On 10/11/2013 12:43 PM, Barry Warsaw wrote: On Oct 11, 2013, at 06:27 PM, Georg Brandl wrote: Maybe to fit in with other verb-like APIs used as context managers: it's open() not opened(). open() predates context managers, but maybe we need a new co

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-12 Thread Glenn Linderman
On 10/11/2013 12:09 PM, Zero Piraeus wrote: with blithe_disdain_concerning(...): +1 :) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/pyt

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-13 Thread Glenn Linderman
On 10/12/2013 11:57 PM, Nick Coghlan wrote: For the record, this thread did prompt me to consider the new construct anew, but on reflection, I still consider it a reasonable addition to contextlib. It substantially improves the simple cases it is intended to help with, and, if anything, mak

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-14 Thread Glenn Linderman
On 10/14/2013 5:18 PM, Nick Coghlan wrote: What the new CM *doesn't* handle nicely is multi-statement suites, and I'm OK with that. Yeah, that is the dubious part. You can't even convince python-dev that saving 2 lines to ignore an exception in one line of code is a good idea, at the cost of

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-15 Thread Glenn Linderman
On 10/15/2013 9:28 AM, PJ Eby wrote: On Tue, Oct 15, 2013 at 11:52 AM, R. David Murray wrote: >I think 'trap' would be much clearer. +1. Short and sweet, and just ambiguous enough that you don't leap to the conclusion that the error is ignored. I agree that "suppress" is basically a synonym

Re: [Python-Dev] On suppress()'s trail blazing (was Re: cpython: Rename contextlib.ignored() to contextlib.ignore())

2013-10-17 Thread Glenn Linderman
On 10/17/2013 9:06 AM, Barry Warsaw wrote: There's a fundamental conceptual shift here that's worth exploring more, and which I think was first identified by RDM. Until now, context managers were at their heart (at least IMHO) about managing "resources". A general resource might be an open file

[Python-Dev] Merry Christmas to me, and Python users everywhere

2016-12-26 Thread Glenn Linderman
I didn't see an announcement that 3.6.0 had actually been released, but I have been longing for the ability to actually write UTF-8 strings to the console without using "ascii" or "json.dumps" to avoid the cp437 codec, and be able to write characters from other the whole Unicode repertoire. I w

Re: [Python-Dev] Merry Christmas to me, and Python users everywhere

2016-12-26 Thread Glenn Linderman
On 12/26/2016 1:25 AM, Glenn Linderman wrote: I didn't see an announcement that 3.6.0 had actually been released Off list, Burkhard Meier helped me figure out why I hadn't seen the announcement: It was sent as one email cross-posted to multiple groups. I am subscribed to 3 of th

Re: [Python-Dev] Merry Christmas to me, and Python users everywhere

2016-12-27 Thread Glenn Linderman
On 12/27/2016 8:09 AM, Ethan Furman wrote: On 12/26/2016 08:46 PM, Glenn Linderman wrote: So either Google (my email host) noticed that I got 3 of the same message, and suppressed two of them, or the python-dev mail server that hosts the mailing lists merged the expanded destinations with

[Python-Dev] PEP 514 and pywin32

2016-12-27 Thread Glenn Linderman
So today I tried to install pywin32 on my new Python 3.6.0 and got the following error: --- Cannot install --- Python version 3.6-32 required, which was not found in the registry. --- OK --- Seems li

Re: [Python-Dev] PEP 514 and pywin32

2016-12-28 Thread Glenn Linderman
ut on their post-install steps, but most people don't need those anyway. Cheers, Steve Top-posted from my Windows Phone From: Burkhard Meier <mailto:burkhardame...@gmail.com> Sent: ‎12/‎28/‎2016 1:43 To: Gle

Re: [Python-Dev] What version is an extension module binary compatible with

2017-03-28 Thread Glenn Linderman
On 3/28/2017 9:18 AM, Paul Moore wrote: On 28 March 2017 at 12:24, Miro Hrončok wrote: I'd like some clarification on what ABI compatibility we can expect. * Should the ABI be stable across patch releases (so calling PySlice_AdjustIndices from an existing macro would be a bug)? * Should the

Re: [Python-Dev] "Micro-optimisations can speed up CPython"

2017-05-30 Thread Glenn Linderman
On 5/30/2017 2:18 PM, Guido van Rossum wrote: On Tue, May 30, 2017 at 11:49 AM, David Wilson > wrote: On Tue, May 30, 2017 at 09:38:55PM +0300, Serhiy Storchaka wrote: > > In early ages of C structures didn't create namespaces, and member > > names wer

Re: [Python-Dev] PEP 538 warning at startup: please remove it

2017-06-12 Thread Glenn Linderman
On 6/12/2017 1:11 PM, Terry Reedy wrote: I do not have any locale-related env vars. You should check whether the warning is off on all Win10 systems, as well as Win7 and Win8. Many Windows users know nothing about ENV VARS, and even if they do, they may not know how (I don't know the details)

Re: [Python-Dev] PEP 538 warning at startup: please remove it

2017-06-25 Thread Glenn Linderman
On 6/25/2017 8:14 AM, Terry Reedy wrote: On 6/12/2017 4:30 PM, Glenn Linderman wrote: On 6/12/2017 1:11 PM, Terry Reedy wrote: I do not have any locale-related env vars. You should check whether the warning is off on all Win10 systems, as well as Win7 and Win8. Many Windows users know

Re: [Python-Dev] PEP 550 v4

2017-08-28 Thread Glenn Linderman
On 8/28/2017 6:50 PM, Guido van Rossum wrote: FWIW we *could* have a policy that OS threads also inherit the lookup chain from their creator, but I doubt that's going to fly with backwards compatibility. Since LC is new, how could such a policy affect backwards compatibility? The obvious answ

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Glenn Linderman
On 9/6/2017 1:18 PM, Gregory P. Smith wrote: I'm not concerned about moving things into a state structure rather than wildly scattered globals declared all over the place.  It is good code hygiene. It ultimately moves us closer (much more work to be done) to being able to actually have multiple

[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 typi

[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. ___ Py

[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: 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 the

[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, it wa

[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 deprecatio

[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

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

2019-08-09 Thread Glenn Linderman
ng a lot). On Fri, 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 meani

[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-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 compa

[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 Lind

[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

[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 decoding,

[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 for this

[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: 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 th

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

2019-08-11 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: 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 docu

[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 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-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: 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 sequences

[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 s

[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 machine

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

2019-10-14 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 it

[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 win32

[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 thes

[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: 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: Improvement to SimpleNamespace

2020-04-14 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 point-out

[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 guess

[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 are

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

2020-04-21 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 support

[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 d

[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 whic

[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 list

[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 only

[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 > require

[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-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 try/except/except/.../fin

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Glenn Linderman
On approximately 3/3/2009 4:51 PM, came the following characters from the keyboard of Greg Ewing: Terry Reedy wrote: I almost agree, except that the API uses the dict, not list, API. Yes, as long as the API is dict-like, it really needs to be thought of as a kind of dict. Perhaps the termino

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-04 Thread Glenn Linderman
On approximately 3/3/2009 11:22 PM, came the following characters from the keyboard of Raymond Hettinger: Perhaps the terminology should be ordereddict -- what we have here sorteddict -- hypothetical future type that keeps itself sorted in key order +1 -1 Introducing

Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-03-22 Thread Glenn Linderman
On approximately 3/22/2009 8:48 PM, came the following characters from the keyboard of Terry Reedy: One of the disappointments of CPython 3.0 on Windows is that the switch to unicode for text (str), coupled with the continued use of a unicode-oblivious (obtuse) user interface (MS 'Command Prompt

Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-03-23 Thread Glenn Linderman
On approximately 3/23/2009 12:12 PM, came the following characters from the keyboard of Terry Reedy: Glenn Linderman wrote: One can set CMD into Unicode mode (chcp 65001)... not sure how Python reacts to that either. But even then... I tried that and others have reported doing so on

Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-03-24 Thread Glenn Linderman
On approximately 3/24/2009 10:16 AM, came the following characters from the keyboard of INADA Naoki: Hi. I'm Japanese and non-ascii charactor user. (cp932) We have to use "IME" to input non-ascii charactor in Windows. When "> chcp 65001" in cmd.exe, we cannot use IME on cmd.exe. So setting code

Re: [Python-Dev] [Email-SIG] Dropping bytes "support" in json

2009-04-10 Thread Glenn Linderman
On approximately 4/10/2009 9:56 AM, came the following characters from the keyboard of Barry Warsaw: On Apr 10, 2009, at 1:19 AM, gl...@divmod.com wrote: On 02:38 am, ba...@python.org wrote: So, what I'm really asking is this. Let's say you agree that there are use cases for accessing a header

Re: [Python-Dev] Needing help to change the grammar

2009-04-12 Thread Glenn Linderman
On approximately 4/12/2009 2:41 PM, came the following characters from the keyboard of Tony Nelson: At 16:30 -0400 04/12/2009, Terry Reedy wrote: ... Source in .pyb (python-brazil) is parsed with with your new parser, ... In case anyone ever does this again, I suggest that the extension be

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-24 Thread Glenn Linderman
On approximately 4/24/2009 12:59 AM, came the following characters from the keyboard of Simon Cross: On Wed, Apr 22, 2009 at 8:50 AM, "Martin v. Löwis" wrote: For Python 3, one proposed solution is to provide two sets of APIs: a byte-oriented one, and a character-oriented one, where the charact

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-24 Thread Glenn Linderman
On approximately 4/24/2009 11:40 AM, came the following characters from the keyboard of Stephen J. Turnbull: Antoine Pitrou writes: > Stephen J. Turnbull xemacs.org> writes: > > > > Well, the problem is that both parts are false. If you didn't start > > with a valid string in a known enco

Re: [Python-Dev] Dates in python-dev

2009-04-24 Thread Glenn Linderman
On approximately 4/24/2009 10:06 AM, came the following characters from the keyboard of Oleg Broytmann: On Fri, Apr 24, 2009 at 05:29:29PM +0100, MRAB wrote: I've recently subscribed to this list and received my first "Summary of Python tracker Issues". What I find annoying are the dates, for ex

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-26 Thread Glenn Linderman
On approximately 4/25/2009 5:35 AM, came the following characters from the keyboard of Martin v. Löwis: Because the encoding is not reliably reversible. Why do you say that? The encoding is completely reversible (unless we disagree on what "reversible" means). I'm +1 on the concept, -1 on the

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/25/2009 5:22 AM, came the following characters from the keyboard of Martin v. Löwis: The problem with this, and other preceding schemes that have been discussed here, is that there is no means of ascertaining whether a particular file name str was obtained from a str API, or wa

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 12:55 AM, came the following characters from the keyboard of Cameron Simpson: On 26Apr2009 23:39, Glenn Linderman wrote: [...snip...] There are still issues regarding how Windows and POSIX programs that are sharing cross-mounted file systems might communicate

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 12:42 PM, came the following characters from the keyboard of Martin v. Löwis: It's a private use area. It will never carry an official character assignment. I know that U+F - U+F is a private use area. I don't find a definition of U+F01xx to know what the not

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 12:48 PM, came the following characters from the keyboard of Martin v. Löwis: There are still issues regarding how Windows and POSIX programs that are sharing cross-mounted file systems might communicate file names between each other, which is not at all clear from th

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 2:14 PM, came the following characters from the keyboard of Cameron Simpson: On 27Apr2009 00:07, Glenn Linderman wrote: On approximately 4/25/2009 5:22 AM, came the following characters from the keyboard of Martin v. Löwis: The problem with this, and other

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 5:42 PM, came the following characters from the keyboard of Cameron Simpson: I think that, almost independent of this PEP, there should be an os.fsencode() function that takes a byte string (as a POSIX OS call will take) and performs the _same_ byte->string encoding tha

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 8:35 PM, came the following characters from the keyboard of Martin v. Löwis: Glenn Linderman wrote: On approximately 4/27/2009 12:42 PM, came the following characters from the keyboard of Martin v. Löwis: It's a private use area. It will never carry an off

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 8:39 PM, came the following characters from the keyboard of Martin v. Löwis: I'm not suggesting the PEP should solve the problem of mounting foreign file systems, although if it doesn't it should probably point that out. I'm just suggesting that if the people that writ

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Glenn Linderman
On approximately 4/27/2009 7:11 PM, came the following characters from the keyboard of Cameron Simpson: On 27Apr2009 18:15, Glenn Linderman wrote: The problem with this, and other preceding schemes that have been discussed here, is that there is no means of ascertaining whether a particular

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 10:00 AM, came the following characters from the keyboard of Martin v. Löwis: An alternative that doesn't suffer from the risk of not being able to store decoded strings would have been the use of PUA characters, but people rejected it because of the potential ambigui

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 10:53 AM, came the following characters from the keyboard of James Y Knight: On Apr 28, 2009, at 2:50 AM, Martin v. Löwis wrote: James Y Knight wrote: Hopefully it can be assumed that your locale encoding really is a non-overlapping superset of ASCII, as is required

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 11:55 AM, came the following characters from the keyboard of MRAB: I've been thinking of "python-escape" only in terms of UTF-8, the only encoding mentioned in the PEP. In UTF-8, bytes 0x00 to 0x7F are decodable. UTF-8 is only mentioned in the sense of having special

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 6:01 AM, came the following characters from the keyboard of Lino Mastrodomenico: 2009/4/28 Glenn Linderman : The switch from PUA to half-surrogates does not resolve the issues with the encoding not being a 1-to-1 mapping, though. The very fact that you think you can

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 1:25 PM, came the following characters from the keyboard of Martin v. Löwis: The UTF-8b representation suffers from the same potential ambiguities as the PUA characters... Not at all the same ambiguities. Here, again, the two choices: A. use PUA characters to repres

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 2:02 PM, came the following characters from the keyboard of Martin v. Löwis: Glenn Linderman wrote: On approximately 4/28/2009 1:25 PM, came the following characters from the keyboard of Martin v. Löwis: The UTF-8b representation suffers from the same potential

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 2:01 PM, came the following characters from the keyboard of MRAB: Glenn Linderman wrote: On approximately 4/28/2009 11:55 AM, came the following characters from the keyboard of MRAB: I've been thinking of "python-escape" only in terms of UTF-8, th

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 7:40 PM, came the following characters from the keyboard of R. David Murray: On Tue, 28 Apr 2009 at 13:37, Glenn Linderman wrote: C. File on disk with the invalid surrogate code, accessed via the str interface, no decoding happens, matches in memory the file on disk

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
ons that could call 3rd party filenames-as-bytes libraries in 2.x must be tweaked to do something different than they did before. On 27Apr2009 23:52, Glenn Linderman wrote: On approximately 4/27/2009 7:11 PM, came the following characters from the keyboard of Cameron Simpson: [...

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-28 Thread Glenn Linderman
On approximately 4/28/2009 10:52 PM, came the following characters from the keyboard of Martin v. Löwis: C. File on disk with the invalid surrogate code, accessed via the str interface, no decoding happens, matches in memory the file on disk with the byte that translates to the same surrogate, ac

Re: [Python-Dev] PEP 383 (again)

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 12:17 AM, came the following characters from the keyboard of Martin v. Löwis: OK, so you are saying that under PEP 383, utf-8b wouldn't be used anywhere on Windows by default. That's not clear from your proposal. You didn't read it carefully enough. The first three p

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 12:38 AM, came the following characters from the keyboard of Baptiste Carvello: Glenn Linderman a écrit : 3. When an undecodable byte 0xPQ is found, decode to the escape codepoint, followed by codepoint U+01PQ, where P and Q are hex digits. The problem with this

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 12:29 AM, came the following characters from the keyboard of Martin v. Löwis: C. File on disk with the invalid surrogate code, accessed via the str interface, no decoding happens, matches in memory the file on disk with the byte that translates to the same surrogate, ac

<    1   2   3   4   5   6   7   >