[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Andrew Barnert via Python-ideas
On Jun 17, 2019, at 13:09, Guido van Rossum wrote: > >> On Mon, Jun 17, 2019 at 12:54 PM Andrew Barnert wrote: >>> On Jun 17, 2019, at 07:47, Guido van Rossum wrote: >>> On Mon, Jun 17, 2019 at 7:23 AM Rhodri James wrote: On 16/06/2019 03:34, Guido van Rossum wrote: > I don't

[Python-ideas] Re: Operator as first class citizens -- like in scala -- or yet another new operator?

2019-06-17 Thread James Lu
There is probably some existing python API you can hijack to make custom locals() and globals() work everywhere. Perhaps pdb and inspect.stack are good places to start; maybe there’s a PDB API to break on every new stack frame and maybe you can use inspect to do the proper assignment overrides.

[Python-ideas] Re: Operator as first class citizens -- like in scala -- or yet another new operator?

2019-06-17 Thread James Lu
Perhaps you should take a look at Dlang. Using opDispatch and a with statement and compile time code generation, you may be able to accomplish what you’re trying to do entirely in D. > On May 24, 2019, at 4:05 AM, Yanghao Hua wrote: > >> On Fri, May 24, 2019 at 1:59 AM Steven D'Aprano wrote:

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Guido van Rossum
On Mon, Jun 17, 2019 at 12:54 PM Andrew Barnert wrote: > On Jun 17, 2019, at 07:47, Guido van Rossum wrote: > > On Mon, Jun 17, 2019 at 7:23 AM Rhodri James wrote: > >> On 16/06/2019 03:34, Guido van Rossum wrote: >> > I don't actually know how viable this proposal is, but given that it's >> >

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Andrew Barnert via Python-ideas
On Jun 17, 2019, at 07:47, Guido van Rossum wrote: > >> On Mon, Jun 17, 2019 at 7:23 AM Rhodri James wrote: >> On 16/06/2019 03:34, Guido van Rossum wrote: >> > I don't actually know how viable this proposal is, but given that it's >> > being debated at some length, I'd like to put in my

[Python-ideas] Re: Operator as first class citizens -- like in scala -- or yet another new operator?

2019-06-17 Thread Caleb Donovick
> It's because Python doesn't actually have assignment to variables, it > has binding to names. So there's no "there" there to provide a > definition of assignment. In a class definition, the "local > variables" are actually attributes of the class object. That class > object provides the

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Guido van Rossum
On Mon, Jun 17, 2019 at 7:23 AM Rhodri James wrote: > On 16/06/2019 03:34, Guido van Rossum wrote: > > I don't actually know how viable this proposal is, but given that it's > > being debated at some length, I'd like to put in my opinion that *if* > > we're going to define an operator that's

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Rhodri James
On 16/06/2019 03:34, Guido van Rossum wrote: I don't actually know how viable this proposal is, but given that it's being debated at some length, I'd like to put in my opinion that *if* we're going to define an operator that's (roughly) synonymous with issubclass(), it should be '<:', which is

[Python-ideas] Re: Add «iterate non-blocking» wrapper to prevent blocking loop too long

2019-06-17 Thread Nikita Melentev
What is the difference between your code and OP code? ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived