[Python-ideas] Re: Itertools generator injection

2021-03-19 Thread Dennis Sweeney
I'm assuming things like this are what you're talking about: def lazy_product2(*args, repeat=1): "recursive algorithm" args = args * repeat if not args: yield () return for all_but_last in lazy_product2(*args[:-1]): for last

[Python-ideas] Installer/target architecture mismatch

2021-03-19 Thread Dany Lisiansky
An odd suggestion/request here, hope it's the right place to discuss it. So I was trying to install python on the Xbox series S (yup..), so far I got the embedded x86_64 version for windows to work, however, I was unable to get packages to install properly. I'm not familiar enough with Windows

[Python-ideas] Itertools generator injection

2021-03-19 Thread Alastair Stanley via Python-ideas
This is closely related to https://bugs.python.org/issue40230 - "Itertools.product() Out of Memory Errors." `itertools.product()` completely consumes all input iterables before yielding any values, which can cause memory issues in certain (extreme) cases. I recently needed to partially iterate

[Python-ideas] Re: allow initial comma

2021-03-19 Thread Gerrit Holl
Hi, On Fri, 12 Mar 2021 at 15:12, Paul Moore wrote: > This layout style is not something I've ever seen used in "real life", > and I don't think it's something that should be encouraged, much less > added to the language. > More likely because there are two common schools of thought - lists >

[Python-ideas] Re: shouldn't slices be iterable ?

2021-03-19 Thread Serhiy Storchaka
19.03.21 01:44, Cameron Simpson пише: > I know that range(start,end,stride) will produce what I'd want from > iter(slice(start,end,stride)), but wouldn't it be reasonable for a slice > itself to be iterable? > > Yes, only one obvious way and all that, but inside eg __getitem__ it > seems to me