Discussion

Ask HN: What should be added to the syntax of Python and why?

I recently came across the pipe library [0] which allows function chaining in a much more straightforward way:

    sum(fib() | where(lambda x: x % 2 == 0) | take_while(lambda x: x < 4000000))
I know in Lisp languages you can extend the syntax easily, but I was wondering if there are any needs for that in Python.

[0] https://pypi.org/project/pipe/

6 points behnamoh 3 years ago 11 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton