Re: [Python-ideas] Standardising ASGI as a PEP

2018-10-27 Thread Andrew Godwin
On Sat, Oct 27, 2018 at 7:16 PM Nathaniel Smith wrote: > The WSGI PEP is a bit of a funny thing, since it's a PEP that doesn't > really involve the language or stdlib. (I guess there's wsgiref, but I > don't think it being in the stdlib actually affects much these days.) > Right. This is why I

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
On Sat, Oct 27, 2018 at 10:00 PM Chris Angelico wrote: > On Sun, Oct 28, 2018 at 12:53 PM Joy Diamond wrote: > >> - type(x) and x.__class__ don't necessarily agree; under what > >> circumstances are each used? > >> > >> (I've asked this before, and either never got a good answer, or I can't >

Re: [Python-ideas] Standardising ASGI as a PEP

2018-10-27 Thread Nathaniel Smith
The WSGI PEP is a bit of a funny thing, since it's a PEP that doesn't really involve the language or stdlib. (I guess there's wsgiref, but I don't think it being in the stdlib actually affects much these days.) What are you hoping to accomplish by making ASGI a PEP? -n On Sat, Oct 27, 2018 at

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Chris Angelico
On Sun, Oct 28, 2018 at 12:53 PM Joy Diamond wrote: >> - type(x) and x.__class__ don't necessarily agree; under what >> circumstances are each used? >> >> (I've asked this before, and either never got a good answer, or I can't >> keep it straight in my head.) >> >> - what precisely does type(x)

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
On Sat, Oct 27, 2018 at 8:02 PM Steven D'Aprano wrote: > I don't think it is obvious that the behaviour is correct. Presumably > Joy had a use-case for overriding isinstance(), and this optimization > prevented it. > > Joy, can you comment on your use-case, and did you come up with a >

Re: [Python-ideas] loop: statement

2018-10-27 Thread Steven D'Aprano
On Sat, Oct 27, 2018 at 07:37:32PM -0400, Juancarlo Añez wrote: > A `loop:` statement to replace `while True:` has probably been discussed at > length more than once. > > Does anyone keep links to the discussions? Google :-) This might get you started:

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Chris Angelico
On Sun, Oct 28, 2018 at 11:02 AM Steven D'Aprano wrote: > > """ > > (Note that any object `x` is always considered to be an instance of > > `x.__class__`, and this cannot be overridden.) > > """ > > I would rather be precise about what is going on, and state that > X.__instancecheck__(x) is not

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Steven D'Aprano
On Sun, Oct 28, 2018 at 05:24:43AM +1100, Chris Angelico wrote: > On Sun, Oct 28, 2018 at 5:03 AM Joy Diamond wrote: > > NOTE: As an optimization, isinstance(object, classinfo) does NOT > > call classinfo.__instancecheck__(instance) when type(object) == > > classinfo. I'd like to discuss this

[Python-ideas] Standardising ASGI as a PEP

2018-10-27 Thread Andrew Godwin
Hi everyone, I'd like to breach the topic of standardising an asynchronous successor to WSGI - specifically, the ASGI specification I and a group of other Python web developers have been refining over the past couple of years (you can read more at https://asgi.readthedocs.io/en/latest/). I'm

[Python-ideas] loop: statement

2018-10-27 Thread Juancarlo Añez
A `loop:` statement to replace `while True:` has probably been discussed at length more than once. Does anyone keep links to the discussions? TIA! -- Juancarlo *Añez* ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
Thanks, Terry. As per your suggestion, I have submitted it as a bug report to: https://bugs.python.org/issue35083 On Sat, Oct 27, 2018 at 4:09 PM Terry Reedy wrote: > On 10/27/2018 2:53 PM, Joy Diamond wrote: > > Chris, > > > > Yes, the following works: > > """ > > (Note that any object `x` is

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Terry Reedy
On 10/27/2018 2:53 PM, Joy Diamond wrote: Chris, Yes, the following works: """ (Note that any object `x` is always considered to be an instance of `type(x)`, and this cannot be overridden.) """ Open a doc issue on bugs.python.org with the problem, motivation, and proposed solution and it

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
Chris, Yes, the following works: """ (Note that any object `x` is always considered to be an instance of `type(x)`, and this cannot be overridden.) """ NOTE: I fixed your sentence of `x.__class__` to `type(x)` since it is not always true that `x.__class__ == type(x)`. For example the actual

Re: [Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Chris Angelico
On Sun, Oct 28, 2018 at 5:03 AM Joy Diamond wrote: > > Greetings, > > This is a request to fix the documentation for __instancecheck__. > > Please add the following (please rewrite better than I can -- I am not good > at explaining concepts in short sentences): > > NOTE: As an optimization,

[Python-ideas] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
Greetings, This is a request to fix the documentation for __instancecheck__. Please add the following (please rewrite better than I can -- I am not good at explaining concepts in short sentences): NOTE: As an optimization, isinstance(*object*, *classinfo*) does NOT call

Re: [Python-ideas] [Distutils] Pypi private repo's

2018-10-27 Thread Jamesie Pic
Hi Steven, I thought they were looking for a company to help them with this project. I didn't want to take the lead on this but if I am then I'm sorry to say that the user story list for the beta is extremely boring: - user can subscribe for free during beta with an email - user can create a