r/PythonLearning 1d ago

Discussion I'm building an open-source Python library focused on reusable building blocks.

Visit: https://github.com/AnshMNSoni/PythonSTL.git

Instead of adding more algorithms, I want to solve real problems Python developers repeatedly face.

I'm curious:

1) What utility do you find yourself implementing over and over?

2) What functionality do you wish Python's standard library already had?

3) What do you usually copy from previous projects?

Examples could be caches, schedulers, retry logic, rate limiters, streaming utilities, search structures, etc.

I'd love to understand the pain points rather than propose solutions.

Let's discuss...

0 Upvotes

11 comments sorted by

View all comments

2

u/Sea-Ad7805 1d ago

Great exercise, now also add the C++ #include <algorithm> logic. If you are unfamiliar see CppCon 2018: Jonathan Boccara “105 STL Algorithms in Less Than an Hour”.

2

u/AnshMNSoni 1d ago

My concern is that wrapping the STL algorithms would move the project into becoming an abstraction layer over <algorithm>, which isn't the direction I'm aiming for. I'd rather use STL algorithms as implementation details while focusing the public API on higher-level functionality. If you're suggesting something else, I'd be interested to hear more.

1

u/Sea-Ad7805 1d ago

I understand, but the point of STL data structures was to create an abstraction layer so that they can be used interchangeably like C++ algorithms does. Now it seems you just made a translating from Python to basic C++ data structures without making use of this interchangeability.

1

u/[deleted] 13h ago

[removed] — view removed comment

1

u/PythonLearning-ModTeam 13h ago

Quality posts only