Ancestors

Toot

Written by Hynek Schlawack on 2025-02-01 at 15:00

There is some beauty in the fact that my oldest #Python project first is still in the top 1% of PyPI. The last release was six years ago, I don’t expect another one ever again, and yet its functionality never made it into the standard library due to gatekeeping.

https://clickpy.clickhouse.com/dashboard/first

=> More informations about this toot | More toots from hynek@mastodon.social

Descendants

Written by Viacheslav Andzhich on 2025-02-01 at 15:13

@hynek What kind of gatekeeping they practice?

=> More informations about this toot | More toots from via4@mastodon.social

Written by Hynek Schlawack on 2025-02-01 at 15:16

@via4 There’s this running gag of https://docs.python.org/3/library/itertools.html being mostly great at showing what functions itertools COULD contain. It’s a turf thing and that’s all I’ll say on that topic.

=> More informations about this toot | More toots from hynek@mastodon.social

Written by Daniel on 2025-02-01 at 15:20

@hynek @via4 still salty there's no proper partition or nth_element and similar in there 🦧🍋

=> More informations about this toot | More toots from djh@chaos.social

Written by Serge Matveenko ♻️☮️Ⓐ on 2025-02-02 at 08:47

@djh @hynek @via4

As doc says everything could be achieved using those primitives.

So, these two could be implemented using islice.

=> More informations about this toot | More toots from lig@fosstodon.org

Written by Daniel on 2025-02-02 at 10:55

@lig @hynek @via4 I believe that's where the mindsets differ.

I'd appreciate a high-level and well-built abstraction such as partition so that I can work on my domain specific problem without first having to worry about the nitty gritty details.

It's batteries included for a reason 🔋✨

=> More informations about this toot | More toots from djh@chaos.social

Written by Viacheslav Andzhich on 2025-02-02 at 11:51

@djh @lig @hynek I feel conflicted about it, on one hand I like minimalism, and it's easier to just be able to remember everything a lib can do, so you immediately know what is there and what you have to implement/import. On the other hand, it is kind of annoying to copy the same stuff over from project to project, first() being maybe one of the top examples

=> More informations about this toot | More toots from via4@mastodon.social

Written by Hynek Schlawack on 2025-02-02 at 12:00

@via4 @djh @lig there's always a tension which batteries should be included and which not and everybody wants to be minimalistic as long it covers their minimal needs 🤷‍♂️ I feel like iteration tools that help you write better and more idiomatic code and that are easy to get wrong should be a prime group tho

=> More informations about this toot | More toots from hynek@mastodon.social

Written by Serge Matveenko ♻️☮️Ⓐ on 2025-02-02 at 12:27

@hynek @via4 @djh

Well, there are two questions here: what should be included in a library according to its purpose? And what should be included as a battery in a standard library?

Personally, I'd like to see much less in Python's stdlib than there's now. However, regarding iteration tools I'd rather agree that they should be an integral part of a language and they are in several other languages.

=> More informations about this toot | More toots from lig@fosstodon.org

Written by Viacheslav Andzhich on 2025-02-02 at 11:38

@hynek they couldn't have resisted if you just called it coalesce() :)

=> More informations about this toot | More toots from via4@mastodon.social

Written by Carlton Gibson 🇪🇺 on 2025-02-02 at 07:36

@hynek perhaps we should mention this more often…

https://more-itertools.readthedocs.io/en/stable/index.html

=> More informations about this toot | More toots from carlton@fosstodon.org

Written by Hynek Schlawack on 2025-02-02 at 08:19

@carlton I’m more of a boltons guy but I still wish basic functions like this wouldn’t have to live all over PyPI

=> More informations about this toot | More toots from hynek@mastodon.social

Written by Carlton Gibson 🇪🇺 on 2025-02-02 at 08:22

@hynek ah, I hadn’t seen that, thanks!

https://boltons.readthedocs.io/en/latest/

Agreed: I’m in club refreshed batteries 🔋— that’s always a difficult (impossible?) conversation though. 😔

=> More informations about this toot | More toots from carlton@fosstodon.org

Written by Noah K on 2025-02-02 at 08:24

@carlton @hynek utils.py, the junk drawer of every project

=> More informations about this toot | More toots from coderanger@cloudisland.nz

Written by Harro van der Klauw on 2025-02-02 at 08:44

@coderanger @carlton @hynek oh is the module called util or utils, or even utilities, functions, helpers, base, contrib

=> More informations about this toot | More toots from hvdklauw@mastodon.social

Written by Jeff Forcier on 2025-02-02 at 16:56

@hvdklauw @coderanger @carlton @hynek I can’t BELIEVE you forgot “tools”/“tooling”! (Well, ok, I can, 🤣)

=> More informations about this toot | More toots from bitprophet@social.coop

Written by Tin Tvrtković on 2025-02-02 at 11:32

@hynek @carlton at least itertools.batched made it into 3.12. I had to copy/paste that one between projects for years

=> More informations about this toot | More toots from tintvrtkovic@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113929225379806133
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
337.434988 milliseconds
Gemini-to-HTML Time
3.670051 milliseconds

This content has been proxied by September (3851b).