[Python-ideas] Powerset

2018-10-15 Thread Hasan Diwan
[if this isn't the correct spot, let me know and I'll gladly take it elsewhere] I have found myself needing powerset functionality several times recently to the point where I wondered if there's interest in making it part of the standard library. I have a working implementation and tests. Would

Re: [Python-ideas] Powerset

2018-10-15 Thread Hasan Diwan
> This is certainly the right place to discuss this, but you shouldn't > assume that everyone reading will know what powerset functionality you > are referring to. > Is it the same as the recipe in the itertools documentation? Yes pretty much. > >

Re: [Python-ideas] Powerset

2018-10-16 Thread Hasan Diwan
On Mon, 15 Oct 2018 at 23:25, Pål Grønås Drange wrote: > Hasan, if you recall that the powerset is just > `yield from S choose k for k from 0 to |S|+1`, > you see that that is exactly the implementation in the examples page. I know that, but when one searches for a powerset function, the logical

Re: [Python-ideas] Powerset

2018-10-16 Thread Hasan Diwan
Pal, On Tue, 16 Oct 2018 at 01:36, Pål Grønås Drange wrote: > I do however agree that there could be a powerset function there for > convenience, but only +0. That is the best argument I could come up with to justify a set#powerset method. -- H -- OpenPGP:

Re: [Python-ideas] "slur" vs "insult"?

2018-09-21 Thread Hasan Diwan
English is not straightforward and is constantly evolving. -- H On Fri, 21 Sep 2018 at 08:45, Rhodri James wrote: > > On 21/09/18 16:23, Ryan Gonzalez wrote: > > Kinda OT, but I believe the connotation is that slur is use of the word, > > whereas an insult is use directed at someone. > >

Re: [Python-ideas] Dict joining using + and +=

2019-02-28 Thread Hasan Diwan
Do we really need a "+" and a "-" operation on dictionaries? [dictinstance.update({k:v}) for k,v in dictinstance.items()] does handle merges already. And I'm assuming that "-" should return the difference -- set(d1.keys()) - set(d2.keys()), right? -- H -- OpenPGP:

Re: [Python-ideas] Clearer communication

2019-02-02 Thread Hasan Diwan
On Sat, 2 Feb 2019 at 06:12, Paul Moore wrote: > On Sat, 2 Feb 2019 at 13:55, Adrien Ricocotam wrote: > > Just a point about writing clear and precise English. For a good part of > the audience and the writers, English is not our native language. Even if > I’m considered good in English

Re: [Python-ideas] What factors led Guido to quit?

2019-02-03 Thread Hasan Diwan
James, Beginning an email with "I want y’all to think about this very carefully" isn't going to get you the answer you want. It would have been better, if you're curious as to why Guido "quit", the best way would be to go through the archives of python-dev, as he did enumerate the reasons in a

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-20 Thread Hasan Diwan
Instead of adding pyInstaller, why not link with libpython as in the embedding section of the documentation? -- H On Fri, 20 Nov 2020 at 21:25, Abdur-Rahmaan Janhangeer wrote: > Greetings list, > > > Use the simpler options until you can't use them. Then use the more > complicated options. > >

[Python-ideas] Re: Syntax proposal of for..in..if in regular for loops

2022-04-03 Thread Hasan Diwan
On Tue, 1 Mar 2022 at 17:31, Svein Seldal wrote: > for x in (a for a in y if c): -1 on this form, I know it's supported, but I can see it getting ugly, i.e. for x in (a for x in (a for x in a)) # add a few more "for x in (a" and it will get messy fast > or > > it = (a for a in