[Python-ideas] Re: `is in`/`not is in` operators

2021-10-27 Thread Jeremiah Vivian
All containers do have a concept of iterators though, and the `is in` operator can check using the iterator of the container. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-27 Thread Mike Miller
On 2021-10-25 15:59, Steven D'Aprano wrote: None of them are passed twice. Yes, the word "passed" misses the mark. *Moving* code from one place to another isn't *repeating* the code. I think that captures the problem nicely. This is already possible in a much clearer way. I'd still

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-27 Thread Erik Demaine
On Tue, 26 Oct 2021, Christopher Barker wrote: It's not actually documented that None indicates "use the default". Which, it turns out is because it doesn't :-) In [24]: bisect.bisect([1,3,4,6,8,9], 5, hi=None) ---

[Python-ideas] Re: Python Shared Objects

2021-10-27 Thread Marc-Andre Lemburg
On 25.10.2021 21:40, byk...@gmail.com wrote: > Due to https://www.python.org/dev/peps/pep-0554/ multi-interpreters > implementation going really slow, I had the audicity to try an alternative > route > towards the same objective of implementing multicore support of python: > instead of sharing

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 5:14 PM Brendan Barnwell wrote: > Now it's true that we have asymmetry, in that SIMPLE logic can be > readably inlined as an early-bound default, whereas even simple logic > cannot be inlined as a late-bound default because there is no inline way > to express

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 4:07 PM Christopher Barker wrote: > > It's not actually documented that None indicates "use the default". > > Which, it turns out is because it doesn't :-) > > In [24]: bisect.bisect([1,3,4,6,8,9], 5, hi=None) >

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-27 Thread Brendan Barnwell
On 2021-10-26 20:15, Chris Angelico wrote: One truism of language design is that the simpler the language is (and the easier to explain to a novice), the harder it is to actually use. For instance, we don't *need* async/await, or generators, or list comprehensions, or for loops, or any of those