[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-18 Thread MRAB
On 2023-05-19 00:54, Greg Ewing wrote: On 19/05/23 4:16 am, Christopher Barker wrote: The problem with "batteries included" is that what exactly is a battery is hard to define, and everyone has a different opinion about it. To my mind, "batteries included" means you can do *something* useful w

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-18 Thread Greg Ewing
On 19/05/23 4:16 am, Christopher Barker wrote: The problem with "batteries included" is that what exactly is a battery is hard to define, and everyone has a different opinion about it. To my mind, "batteries included" means you can do *something* useful with it out of the box. It doesn't mean y

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-18 Thread Christopher Barker
The problem with "batteries included" is that what exactly is a battery is hard to define, and everyone has a different opinion about it. It's my observation that in recent (~10?) years, the core devs are pretty carfeul about including anything new in teh stdlib -- it has its upsides, for sure, bu

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-17 Thread Chris Angelico
On Thu, 18 May 2023 at 05:14, Daniel Guffey wrote: > > Apologies, I didn't mean to imply PyPI was inherently untrustworthy, > unusable, or irrelevant. Clearly, it has a place and I use it for packages > that I am familiar with and trust. Then I would advise being careful how you word things, si

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-17 Thread Daniel Guffey
Apologies, I didn't mean to imply PyPI was inherently untrustworthy, unusable, or irrelevant. Clearly, it has a place and I use it for packages that I am familiar with and trust. The frame I'm trying to convey is that: 1. Developers are not the only consumers. e.g. If you're in an organization wi

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-17 Thread David Mertz, Ph.D.
On Wed, May 17, 2023 at 2:22 PM Daniel Guffey wrote: > I'm a bit dubious about the pypi suggestion as packages are being > regularly poisoned with malware ( e.g. New KEKW malware infects > open-source Python Wheel files via a PyPI distribution | SC Media > (scmagazine.com) >

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-17 Thread Daniel Guffey
Thanks for the reference, Lucas. I wasn't familiar with toolz and it looks similar to a package I'm contributing to with a similar purpose of filling holes in the standard library, as such shouldn't some of this stuff be targeted for integration? I'm a bit dubious about the pypi suggestion as pac

[Python-ideas] Re: @lazy decorator an alternative to functools.partial ?

2023-05-13 Thread Lucas Wiman
Seems fine, but a pypi library seems better than the standard library. Separately, I think this is usually called "currying", and there are already libraries which implement this functionality, eg toolz: https://toolz.readthedocs.io/en/latest/curry.html Best wishes, Lucas Wiman ___