On Thu, Apr 1, 2021 at 11:54 AM Caleb Donovick wrote:
>
> > Here, `Child` will *not* match as a sequence, even though it probably
> > should,
>
> Strong disagree, if I explicitly set `__match_seq__` to `False` in `Parent`
> I probably have a good reason for it and would absolutely expect
On Thu, Mar 11, 2021 at 12:16 AM Evpok Padding wrote:
>
> Dear all,
>
> Apparently renaming a git branch to follow the general convention is now an
> unbearable outrage.
It is NOT a general convention. It is a push by Microsoft (owners of
GitHub). Outside of GitHub, the git command still uses
On Thu, Mar 11, 2021 at 2:48 AM Charalampos Stratakis
wrote:
>
>
>
> - Original Message -
> > From: "Chris Angelico"
> > To: "Python-Dev"
> > Sent: Wednesday, March 10, 2021 4:20:19 PM
> > Subject: [Python-Dev] Re: Steering Counci
On Sun, Mar 21, 2021 at 1:30 PM Yury Selivanov wrote:
> That said I wouldn't mind aiter() supporting the two-arguments mode as it
> could make it easier to convert some sync code bases (that use greenlets, for
> example) to async. And given that async iteration mirrors the sync iteration
>
On Wed, Mar 10, 2021 at 12:09 PM Ivan Pozdeev via Python-Dev
wrote:
>
>
> On 10.03.2021 3:53, Chris Angelico wrote:
> > On Wed, Mar 10, 2021 at 11:47 AM Damian Shaw
> > wrote:
> >>> Does 'master' confuse people?
> >> There's a general movement t
On Wed, Mar 10, 2021 at 11:47 AM Damian Shaw
wrote:
>
> > Does 'master' confuse people?
>
> There's a general movement to replace language from common programming
> practises that derive from, or are associated with, the dehumanization of
> people. Such as master and slave, as well as whitelist
On Thu, Apr 15, 2021 at 2:36 PM Hugh Fisher wrote:
>
> > Date: Wed, 14 Apr 2021 09:57:49 +1000
> > From: Chris Angelico
> > Subject: [Python-Dev] Re: Typing syntax and ecosystem, take 2
>
> >
> > You're advocating an approach that absolutely mandates running t
On Wed, Apr 14, 2021 at 9:45 AM Hugh Fisher wrote:
> I don't want Python to be explicitly typed either. I'm happy with dynamic
> typing, and do not want to have to write even
> x : object
You don't. That's not the proposal. The proposals have ALL been about
gradual typing and inferred
On Wed, Apr 14, 2021 at 9:47 AM Hugh Fisher wrote:
>
> > From: Ned Batchelder
> [ munch ]
> > This is very similar to statically typed languages. They also have two
> > steps:
> >
> > * There is the first step that checks the types but does not run the
> > program. In C/C++, this is the
On Wed, Apr 21, 2021 at 1:05 AM Skip Montanaro wrote:
>>
>> Perhaps there's some history in the python-dev archives that would inform
>> you of previous discussions and help you repeating already-considered
>> arguments.
>
>
> This topic has come up a few times over the years. Maybe it would be
On Wed, Apr 21, 2021 at 3:04 AM Mark Shannon wrote:
> Then came type hints. PEP 484 explicitly said that type hints were
> optional and would *always* be optional.
>
> Then came along many typing PEPs that assumed that type hints would only
> used for static typing, making static typing a bit
On Sat, Apr 17, 2021 at 3:20 AM wrote:
>
> The benefits:
>
> 1. You will link with high quality libstdc++ with lots of reusable containers
> without writing your own "buggy" one.
> 2. C++ is much much more maintainable than pure C. It drastically increase
> number of contributors that what like
On Sat, Apr 17, 2021 at 3:32 AM wrote:
>
> Chris Angelico wrote:
> > On Sat, Apr 17, 2021 at 3:20 AM redrad...@gmail.com wrote:
> > > The benefits:
> > >
> > > You will link with high quality libstdc++ with lots of reusable
> > > containers without
On Sun, Feb 7, 2021 at 8:14 AM Luciano Ramalho wrote:
>
> On Sat, Feb 6, 2021 at 6:04 PM Steve Holden wrote:
> >
> > My suggestion that it be introduced via __future__ due to its contentious
> > nature met immediate resistance. No point going down that road.
>
> This is really unfortunate.
>
>
On Sun, Feb 7, 2021 at 6:25 PM Paul Sokolovsky wrote:
>
> Hello,
>
> On Sat, 6 Feb 2021 23:05:19 -0800
> Guido van Rossum wrote:
>
> > That’s incorrect. __future__ is used when something new and
> > *incompatible* is being introduced (and the old way is being
> > deprecated at the same time).
On Sun, Feb 7, 2021 at 7:54 PM Paul Sokolovsky wrote:
>
> So, you're saying that, by the benevolence of divine providence,
> most (can you truly vouch for "all" and provide evidence?) features so
> far added to __future__ never were changed (enough).
No, I'm saying that the __future__ directive
On Sat, Feb 13, 2021 at 6:58 AM Dan Stromberg wrote:
> I believe Python needs to become more independent of CPython, for Python's
> long term health.
>
Since 1997, Python has been defined independently of CPython. There
are numerous documents that define the language semantics for the
benefit
On Sat, Feb 13, 2021 at 10:42 AM Dan Stromberg wrote:
>
>
> On Fri, Feb 12, 2021 at 2:26 PM Chris Angelico wrote:
>>
>> On Sat, Feb 13, 2021 at 6:58 AM Dan Stromberg wrote:
>> > I believe Python needs to become more independent of CPython, for Python's
>>
On Sun, Feb 14, 2021 at 7:38 AM Wes Turner wrote:
>
> https://awesome-safety-critical.readthedocs.io/en/latest/
> https://awesome-safety-critical.readthedocs.io/en/latest/#software-safety-standards
>
> What is and is not constant time in Python could be added to structured data
> elements in
On Fri, Apr 23, 2021 at 11:22 AM Larry Hastings wrote:
>
>
> On 4/20/21 10:03 AM, Mark Shannon wrote:
>
> If you guarded your code with `isinstance(foo, Sequence)` then I could not
> use it with my `Foo` even if my `Foo` quacked like a sequence. I was forced
> to use nominal typing; inheriting
On Fri, Apr 23, 2021 at 6:25 PM Nathaniel Smith wrote:
>
> On Wed, Apr 21, 2021 at 4:50 PM Guido van Rossum wrote:
> > On Wed, Apr 21, 2021 at 3:26 PM Nathaniel Smith wrote:
> >> Sure. This was in my list of reasons why the backwards compatibility
> >> tradeoffs are forcing us into awkward
On Mon, Aug 16, 2021 at 12:24 AM Marco Sulla
wrote:
>
> On Thu, 12 Aug 2021 at 12:54, Steven D'Aprano wrote:
> > Are you looking for upvotes on StackOverflow
>
> This is unacceptable. I pretend your immediate excuses.
>
? I don't understand this, what do you mean?
ChrisA
On Mon, Aug 16, 2021 at 6:36 AM Marco Sulla
wrote:
> > As Chris implied, the second 'sentence' is not grammatical English
>
> Oh, this is enough. The sense of the phrase was very clear and you all
> have understood it. Remarking grammatical errors is a gross violation
> of the Netiquette. I ask
On Mon, Aug 16, 2021 at 7:56 AM Marco Sulla
wrote:
>
> On Sun, 15 Aug 2021 at 23:33, Tim Peters
> wrote:ople have said now, including me, they had no idea what
> > you meant.by "I pretend your immediate excuses". It's not a complaint
> > that it's expressed inelegantly, but that they can't make
On Fri, Aug 27, 2021 at 3:02 AM Skip Montanaro wrote:
>>
>> However, it has become a de facto standard for all Python code, and in the
>> document itself, there is frequent wording akin to "Identifiers used in the
>> standard library must be ASCII compatible ...", and even advice for third
>>
On Mon, Aug 16, 2021 at 5:44 PM Federico Salerno wrote:
>
> "Pretendere" in Italian means "to demand", it's a false friend with the
> English "pretend". I don't know whether Marco is Italian (the false
> friend might also be there between Spanish or whatever other romance
> language he speaks and
On Thu, Aug 19, 2021 at 12:42 PM Jonathan Goble wrote:
>
> On Wed, Aug 18, 2021 at 10:22 PM Terry Reedy wrote:
>>
>> On 8/18/2021 9:37 PM, Edwin Zimmerman wrote:
>> > On 8/18/21 9:18 PM, Jonathan Goble wrote:
>> >> I am mostly a lurker, but I am also considering unsubscribing if someone
>> >>
On Wed, Sep 8, 2021 at 10:42 PM Victor Stinner wrote:
>
> On Wed, Sep 8, 2021 at 7:46 AM Steven D'Aprano wrote:
> > >>> bytes.from_int(121404708502361365413651784, 'little')
> > # should return b'Hello world'
>
> Really? I don't know anyone serializing strings as a "bigint" number.
> Did
On Wed, Aug 11, 2021 at 10:03 PM Larry Hastings wrote:
> Specifically: currently, decorators are called just after the function or
> class object is created, before it's bound to a variable. But we could
> change it so that we first bind the variable to the initial value, then call
> the
On Thu, Aug 12, 2021 at 3:01 AM Larry Hastings wrote:
>
> On 8/11/21 5:15 AM, Chris Angelico wrote:
>
> On Wed, Aug 11, 2021 at 10:03 PM Larry Hastings wrote:
>
> This approach shouldn't break reasonable existing code. That said, this
> change would be observable from Pyt
On Fri, Oct 8, 2021 at 1:51 PM Sam Gross wrote:
>
> Hi,
>
> I've been working on changes to CPython to allow it to run without the global
> interpreter lock. I'd like to share a working proof-of-concept that can run
> without the GIL. The proof-of-concept involves substantial changes to CPython
On Fri, Oct 8, 2021 at 1:45 PM S Pradeep Kumar wrote:
> The Callable type is also usable as an expression, like in type aliases
> `IntOperator = (int, int) -> int` and `cast((int) -> int, f)` calls.
>
> **Question 1**: Are there concerns we should keep in mind about such a syntax
> proposal?
>
On Thu, Oct 14, 2021 at 10:51 AM Victor Stinner wrote:
>
> Honestly, I don't understand well the difference between __int__() and
> __index__().
>
> * https://docs.python.org/dev/reference/datamodel.html#object.__int__
> * https://docs.python.org/dev/reference/datamodel.html#object.__index__
On Sun, Oct 10, 2021 at 2:31 PM Dan Stromberg wrote:
>
>
> On Thu, Oct 7, 2021 at 9:10 PM Chris Angelico wrote:
>>
>> Concurrency is *hard*. There's no getting around it, there's no
>> sugar-coating it. There are concepts that simply have to be learned,
>> and t
On Fri, Oct 22, 2021 at 3:23 AM David Mertz, Ph.D.
wrote:
>
> On Thu, Oct 21, 2021 at 2:52 AM Steven D'Aprano wrote:
>>
>> On Tue, Oct 19, 2021 at 05:09:42PM -0700, Michael Selik wrote:
>> > None and its ilk often conflate too many qualities. For example, is it
>> > missing because it doesn't
On Wed, Oct 20, 2021 at 3:25 AM Baptiste Carvello
wrote:
>
> Le 18/10/2021 à 20:26, Guido van Rossum a écrit :
> >
> > y = None # Default
> > if config is not None:
> > handler = config.get("handler")
> > if handler is not None:
> > parameters = handler.get("parameters")
> > if
On Tue, Sep 28, 2021 at 3:21 AM Eric Snow wrote:
>
> On Mon, Sep 27, 2021 at 11:09 AM Chris Angelico wrote:
> > When exactly does the freezing happen?
>
> When you build the executable (e.g. "make -j8",
> ".\PCbuild\build.bat"). So your changes to
On Tue, Sep 28, 2021 at 2:58 AM Eric Snow wrote:
>
> We've frozen most of the stdlib modules imported during "python -c
> pass" [1][2], to make startup a bit faster. Import of those modules
> is controlled by "-X frozen_modules=[on|off]". Currently it defaults
> to "off" but we'd like to
On Fri, Dec 24, 2021 at 1:36 PM Steven D'Aprano wrote:
> > My question is, why does it need `@Callable`? Lukasz proposed just using
> > any (undecorated) function, with the convention being that the body is
> > `...` (to which I would add the convention that the function *name* be
> >
On Wed, Nov 10, 2021 at 11:44 AM Ethan Furman wrote:
> I don't know if there's a formal name, but in my mind, if you have something
> you don't have nothing. If you have a
> barrel with nothing in it (not even air, just a hard vacuum) then saying you
> have nothing in that barrel is a true
>
On Wed, Nov 10, 2021 at 5:45 PM Steven D'Aprano wrote:
>
> On Wed, Nov 10, 2021 at 05:11:33PM +1100, Chris Angelico wrote:
>
> > Nothing's technically new. You could make an inefficient sorted dict like
> > this:
> >
> > class SortedDict(dict):
> >
On Wed, Nov 10, 2021 at 5:03 PM Christopher Barker wrote:
>
> Maybe a stupid question:
>
> What are use cases for sorted dicts?
>
> I don’t think I’ve ever needed one.
Me neither, tbh.
> Also, I can’t quite tell from the discussion If a “sorted dict” implements
> something new, or is an
On Sat, Nov 13, 2021 at 3:20 AM Steven D'Aprano wrote:
>
> On Fri, Nov 12, 2021 at 10:07:13AM -0500, Paul Ganssle wrote:
>
> > I knew about sortedcontainers and I also don't remember ever seeing a
> > situation where I needed one or recommended its use.
>
> We have a very odd situation where
On Tue, Nov 16, 2021 at 12:13 PM Steven D'Aprano wrote:
>
> On Mon, Nov 15, 2021 at 10:43:12PM +1100, Chris Angelico wrote:
>
> > The problems here are not Python's, they are code reviewers', and that
> > means they're really attacks against the code review tools.
>
>
On Mon, Nov 29, 2021 at 10:11 AM Rob Cliffe via Python-Dev
wrote:
>
> I am slightly surprised that it seems to be *easier* to fold selected
> constant expressions than to have more generic code to fold them all.
> Or at least, all those that don't contain containers, such as
> 1 in [0,1,2]
On Mon, Nov 15, 2021 at 10:22 PM Abdur-Rahmaan Janhangeer
wrote:
>
> Greetings,
>
>
> > Now what happens? where do you go from there to a vunerability or
> backdoor? I think it might be a bit obvious that there is something
> funny going on if I see:
>
> if (user.admin == "root" and
On Wed, Nov 3, 2021 at 1:06 AM Petr Viktorin wrote:
> Let me know if it's clear in the newest version, with this note:
>
> > Here, ``encoding: unicode_escape`` in the initial comment is an encoding
> > declaration. The ``unicode_escape`` encoding instructs Python to treat
> > ``\u0027`` as a
On Wed, Nov 3, 2021 at 5:07 AM David Mertz, Ph.D. wrote:
>
> This is an amazing document, Petr. Really great work!
>
> I think I agree with Marc-André that putting it in the actual Python
> documentation would give it more visibility than in a PEP.
>
There are quite a few other PEPs that have
On Wed, Nov 3, 2021 at 11:09 AM Steven D'Aprano wrote:
>
> On Wed, Nov 03, 2021 at 03:03:54AM +1100, Chris Angelico wrote:
> > On Wed, Nov 3, 2021 at 1:06 AM Petr Viktorin wrote:
> > > Let me know if it's clear in the newest version, with this note:
> > >
> >
As part of messing with the parser for PEP 671, I've come across what
looks like a convention, but I'm not sure of the details.
Most AST nodes start with a capital letter: Expr, Name, BoolOp, etc.
Some don't: keyword, arg, withitem.
Is it true that the ones that don't start with a capital are
On Sat, Oct 23, 2021 at 6:20 AM Marc Mueller wrote:
>
> Most of the discussion so far has been focused on (?.). Tbh though, I'm more
> interested in (??) and (??=). Just reading through code, I constantly notice
> boilerplate like this which could easily be substituted.
>
> variable =
On Sun, Oct 24, 2021 at 12:35 AM Marc Mueller wrote:
>
> > Bear in mind that these last ones are exactly equivalent to the "or"
> > operator, as they'll use the default if you have any falsy value.
> > variable = some_function(...) or []
>
> Isn't that in itself a good argument in favor of (??) ?
On Tue, Nov 9, 2021 at 8:38 PM Sebastian Rittau wrote:
>
> Currently, Python doesn't allow non-default arguments after default
> arguments:
>
> >>> def foo(x=None, y): pass
>File "", line 1
> def foo(x=None, y): pass
> ^
> SyntaxError: non-default argument follows
On Wed, Nov 3, 2021 at 10:22 PM Steven D'Aprano wrote:
>
> On Wed, Nov 03, 2021 at 11:21:53AM +1100, Chris Angelico wrote:
>
> > TBH, I'm not entirely sure how valid it is to talk about *security*
> > considerations when we're dealing with Python source code and va
On Wed, Nov 3, 2021 at 8:01 PM Stephen J. Turnbull
wrote:
>
> Chris Angelico writes:
>
> > But I was surprised to find that Python would let you use
> > unicode_escape for source code.
>
> I'm not surprised. Today it's probably not necessary, but I've
> excha
On Fri, Nov 5, 2021 at 2:59 AM Jonathan Goble wrote:
>
> On Thu, Nov 4, 2021 at 10:37 AM Eric Fahlgren wrote:
>>
>> On Thu, Nov 4, 2021 at 12:01 AM Ethan Furman wrote:
>>>
>>> >>> bytearray.fromsize(5, fill=b'\x0a')
>>> bytearray(b'\x0a\x0a\x0a\x0a\x0a')
>>
>>
>> What happens if you
On Wed, Nov 3, 2021 at 5:12 PM Stephen J. Turnbull
wrote:
>
> Chris Angelico writes:
>
> > Huh. Is that level of generality actually still needed? Can Python
> > deprecate all but a small handful of encodings?
>
> I think that's pointless. With few exceptions (G
On Tue, Nov 30, 2021 at 8:19 PM Paul Moore wrote:
> Also, related to the question Terry raised, IMO it would be useful to
> have a clear statement on code that *does* use type annotations, but
> violates them at runtime. To be specific, is the following considered
> as an error?
>
> >>> def
On Thu, Dec 16, 2021 at 6:03 AM Eric Snow wrote:
> * using the ref count isn't the only viable approach; another would be
> checking the pointer itself
>+ put the object in a specific section of static data and compare
> the pointer against the bounds
>+ this avoids loading the actual
On Thu, Dec 16, 2021 at 7:03 AM Eric Snow wrote:
>
> On Wed, Dec 15, 2021 at 12:18 PM Chris Angelico wrote:
> > Sorry if this is a dumb question, but would it be possible to solve
> > that last point with an immortal arena [1] from which immortal objects
> > could be al
On Sun, Jan 9, 2022 at 3:47 PM Steven D'Aprano wrote:
> The point I am making here is not that I was a dimwit who couldn't even
> read Python, but that "easy to read" and "readable" is more a matter of
> familiarity than an inherent property of the language itself. With
> enough familiarity, even
On Sun, Jan 9, 2022 at 7:35 PM Stephen J. Turnbull
wrote:
>
> Chris Angelico writes:
>
> > Not completely, just very minorly. I'm distinguishing between attacks
> > that can be triggered remotely, and those which require the attacker
> > to run specific Python code
On Mon, Jan 10, 2022 at 3:49 AM Christopher Barker wrote:
> > If "x->y" is syntactically valid anywhere in Python code, it's not a
> problem that there are no core data types for which it's meaningful.)
>
> Here's where I'm not so sure -- this looks a lot like a binary operator, but
> it behaves
On Mon, Jan 10, 2022 at 12:05 PM Steven D'Aprano wrote:
>
> On Mon, Jan 10, 2022 at 05:39:42AM +1100, Chris Angelico wrote:
>
> > From my understanding, "x->y" would create a Callable if given two
> > *types*, but its meaning if given two other objects is still
&
On Fri, Jan 14, 2022 at 2:12 AM Steven Troxler wrote:
>
> Using an operator is an interesting idea, and we should probably call it out
> as an alternative in the PEP.
> It's not a substitute for the current PEP from the standpoint of typing-sig
> for a few reasons:
>
> (A) We care that the
On Fri, Jan 7, 2022 at 6:09 PM Stephen J. Turnbull
wrote:
>
> Chris Angelico writes:
>
> > Python source code is not user input though. So there has to be a way
> > for someone to attack a Python-based service, like attacking a web app
> > by sending HTTP requests to
On Tue, 22 Feb 2022 at 03:00, Larry Hastings wrote:
>
>
> On 2/21/22 22:06, Chris Angelico wrote:
>
> On Mon, 21 Feb 2022 at 16:47, Larry Hastings wrote:
>
> While I don't think it's fine to play devil's advocate, given the choice
> between "this will help a com
On Mon, 21 Feb 2022 at 16:47, Larry Hastings wrote:
>
>
> While I don't think it's fine to play devil's advocate, given the choice
> between "this will help a common production use-case" (pre-fork servers) and
> "this could hurt a hypothetical production use case" (long-running
> applications
On Fri, 1 Apr 2022 at 19:51, Victor Stinner wrote:
> In Python, sadly the types.CodeType type also has a public constructor
> and many projects break at each Python release because the API
> changes. Hopefully, it seems like the new CodeType.replace() method
> added to Python 3.8 mitigated the
On Tue, 29 Mar 2022 at 09:53, Ethan Furman wrote:
>
> In the following bit of code:
>
>
> while s := input.read(MAXBINSIZE):
> while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)):
> s += ns
> line = binascii.b2a_base64(s)
>
On Wed, 9 Feb 2022 at 04:50, Christopher Barker wrote:
> So my thoughts:
>
> Rather than deprecate urllib, we refactor it a bit (and maybe deprecate parts
> of it), so that it:
>
> 1) contains the core building blocks: e.g. urllib.parse with which to build
> "better" libraries,
>
> 2) make the
On Fri, Jan 7, 2022 at 1:59 AM lxr1210--- via Python-Dev
wrote:
>
> Hi all,
>
> I am currently doing some research on the security of CPython. I used the
> open source vulnerability analysis engine, Infer(https://fbinfer.com/), to
> scan the native code of CPython 3.10.0.
>
> The scan results
On Fri, Jan 7, 2022 at 2:57 PM Stephen J. Turnbull
wrote:
>
> Patrick Reader writes:
>
> > And Python is not like JavaScript (in the browser), where code is
> > supposed to be run in a total sandbox. Python is not supposed to be a
> > completely memory-safe language. You can always access
On Fri, 8 Apr 2022 at 18:29, Malthe wrote:
>
> This is an idea which has been brought up before, sometimes introduced
> as "heresy". But an interesting twist has surfaced now which is
> typing.
>
> But firstly, let me present the idea. It is very simple, that Python
> should have declarative
On Sat, 23 Apr 2022 at 11:16, Larry Hastings wrote:
> This PEP proposes an additional syntax for declaring a class which splits
> this work across two statements:
> * The first statement is `forward class`, which declares the class and binds
>the class object.
> * The second statement is
On Tue, 26 Apr 2022 at 22:56, Greg Ewing wrote:
>
> On 26/04/22 12:33 pm, Chris Angelico wrote:
> > That's exactly what I mean though: if the only difference between
> > "monkeypatching" and "not monkeypatching" is whether it was intended,
> &g
On Tue, 26 Apr 2022 at 10:05, Greg Ewing wrote:
>
> On 23/04/22 5:44 pm, Chris Angelico wrote:
> > On Sat, 23 Apr 2022 at 15:32, Larry Hastings wrote:
> >>
> >> Still, it's not the intent of my PEP to condone or facilitate
> >> monkeypatching.
> >&
On Wed, 27 Apr 2022 at 16:04, Greg Ewing wrote:
>
> On 27/04/22 1:26 pm, Chris Angelico wrote:
> > On Wed, 27 Apr 2022 at 11:18, Greg Ewing
> > wrote:
> >>
> >> The proposed feature is analogous to forward declaring a
> >> struct in
On Wed, 27 Apr 2022 at 08:06, Greg Ewing wrote:
>
> On 27/04/22 1:04 am, Joao S. O. Bueno wrote:
> > MonkeyPatching in Python is not illegal in this sense.
>
> I'm not suggesting it is. You're seizing on the wrong part
> of the analogy. The point is that what you call something
> doesn't change
On Wed, 27 Apr 2022 at 11:18, Greg Ewing wrote:
>
> On 27/04/22 2:01 am, Chris Angelico wrote:
> > That would be the case if monkeypatching were illegal. Since it's not,
> > wherein lies the difference?
>
> The proposed feature is analogous to forward declaring a
>
On Wed, 27 Apr 2022 at 05:05, Larry Hastings wrote:
>
>
> On 4/26/22 09:31, MRAB wrote:
>> Perhaps:
>>
>>class C: ...
>
> Also, your suggestion is already legal Python syntax; it creates a class with
> no attributes. So changing this existing statement to mean something else
> would
On Sat, 23 Apr 2022 at 12:50, Larry Hastings wrote:
>
>
> On 4/22/22 19:17, Chris Angelico wrote:
>
> I'm unsure about the forward class. How is it different from subclassing an
> ABC?
>
> They're just different objects. A subclass of an ABC is either itself
>
On Sat, 23 Apr 2022 at 15:32, Larry Hastings wrote:
>
>
> On 4/22/22 22:03, Chris Angelico wrote:
>
> Anyhow, [a forward-defined class object is] a class, with some special
> features (notably that you can't instantiate it).
>
> Yes. Specifically, here's my intention fo
On Sun, 29 May 2022 at 05:05, MRAB wrote:
>
> On 2022-05-28 16:03, MRAB wrote:
> > On 2022-05-28 13:17, Serhiy Storchaka wrote:
> >> 28.05.22 14:57, Damian Shaw пише:
> >>> That PR seems to make \' and \" not special in general right?
> >>>
> >>> I think this is a more limited proposal, to only
On Fri, 22 Jul 2022 at 03:07, Skip Montanaro wrote:
>
> I have a perhaps stupid question. Is Discord the same as
> discuss.python.org, just by another name? I find the similarity in
> names a bit confusing.
>
No, Discord is a different thing; it does text and voice communication
channels in
On Fri, 22 Jul 2022 at 03:17, Skip Montanaro wrote:
>
> > No, Discord is a different thing; it does text and voice communication
> > channels in real-time. If you're familiar with Slack, it's broadly
> > similar in purpose.
>
> Thanks (and to the others who replied). It seems like they've tried
On Mon, 5 Dec 2022 at 05:11, Rob Cliffe via Python-Dev
wrote:
>
> Wild suggestion:
> Make None.__hash__ writable.
> E.g.
> None.__hash__ = lambda : 0 # Currently raises AttributeError:
> 'NoneType' object attribute '__hash__' is read-only
Hashes have to be stable. If you change the
On Tue, 29 Nov 2022 at 09:51, Brett Cannon wrote:
> ... we worked hard to stop people from relying on consistent
> hashing/iteration from random-access data structures like dict and set.
>
Say what? Who's been working hard to stop people from relying on
consistent iteration order for a dict?
On Tue, 29 Nov 2022 at 13:12, Oscar Benjamin wrote:
> As for point 2. the fact that sets are currently non-deterministic is
> actually a relatively new thing in Python. Before hash-randomisation
> set and dict order *was* deterministic but with an arbitrary order.
> That was only changed because
On Wed, 30 Nov 2022 at 10:48, Steven D'Aprano wrote:
> Let's consider a thought-experiment: suppose we agree to your proposal
> to make hash(None) return a constant, but at the same time modify the
> set iteration algorithm so that it starts from a different position each
> time you iterate,
On Thu, 1 Dec 2022 at 17:26, Yoni Lavi wrote:
>
> > the language makes no guarantee about hash consistency between
> executions
>
> because it's futile in the general case, even if objects were to get a serial
> `id` and hash by it for example, any change in the number of objects created
>
On Fri, 27 Jan 2023 at 06:42, Thomas Ratzke wrote:
>
> Hi all,
>
> i would like to suggest the following Python feature. It naturally
> happens that one want's to repeat the current iteration of a for loop
> for example after an error happened. For this purpose, I usually set a
> flag and put a
901 - 992 of 992 matches
Mail list logo