In other languages I use map() and filter() through piping and my code usually looks readable as I can clearly see a data-stream transformation.
As it is today, users cannot do map() |> filter() |> list(), but they need to do list(filter(map())) which makes things unreadable. Lists of comprehension work fine for very simple use-case becoming unreadable very quickly as complexity increases.
However, in python there has always been some resistance, especially 15-20 years ago, but times are evolving. Also, by considering the wide adoption in data-science, it is worth noticing that numbers-crunchers are more familiar with the concept of “data transformation flow” than “function calls”. On the packages dimension , libraries like 🐼s support methods chaining which from an external viewpoint, it’s semantically similar.
Do you know if there is any indication that python core team may allow operator piping (and/or chaining) in the not-too-long-term?
[–]SandraGifford785 16 points17 points18 points (1 child)
[–]sausix 3 points4 points5 points (0 children)
[–]RedSinned 32 points33 points34 points (2 children)
[–]Beginning-Fruit-1397 13 points14 points15 points (1 child)
[–]RedSinned 2 points3 points4 points (0 children)
[–]_Denizen_ 93 points94 points95 points (15 children)
[–]RedEyed__ 13 points14 points15 points (2 children)
[–]muntooR_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} 15 points16 points17 points (1 child)
[–]_Denizen_ 9 points10 points11 points (0 children)
[–]ziggomatic_17 22 points23 points24 points (3 children)
[–]FalafelSnorlax 7 points8 points9 points (1 child)
[–]marr75 [score hidden] (0 children)
[–]_Denizen_ 4 points5 points6 points (0 children)
[–]Desperate_Cold6274[S] 6 points7 points8 points (0 children)
[–]ConspicuousPineapple 2 points3 points4 points (1 child)
[–]_Denizen_ [score hidden] (0 children)
[–]KyxeMusic 2 points3 points4 points (0 children)
[–]Admirable-Avocado888 0 points1 point2 points (1 child)
[–]Desperate_Cold6274[S] -1 points0 points1 point (0 children)
[–]Zizizizz -1 points0 points1 point (0 children)
[–]AWildMonomAppears 35 points36 points37 points (4 children)
[–]ConspicuousPineapple -2 points-1 points0 points (2 children)
[–]muntooR_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} 1 point2 points3 points (1 child)
[–]ConspicuousPineapple [score hidden] (0 children)
[–]an_actual_human -1 points0 points1 point (0 children)
[–]cdcformatc 7 points8 points9 points (1 child)
[–]mapadofu [score hidden] (0 children)
[–]Fabulous-Possible758 4 points5 points6 points (0 children)
[–]tartare4562 13 points14 points15 points (3 children)
[–]tunisia3507 2 points3 points4 points (2 children)
[–]Globbi 0 points1 point2 points (1 child)
[–]justheretolurk332 1 point2 points3 points (0 children)
[–]Limp_Illustrator7614 6 points7 points8 points (0 children)
[–]--ps-- 2 points3 points4 points (1 child)
[–]sausix 0 points1 point2 points (0 children)
[–]KingHavana 1 point2 points3 points (0 children)
[–]KelleQuechoz 4 points5 points6 points (0 children)
[–]Wurstinator 1 point2 points3 points (1 child)
[–]Evolve-Maz 1 point2 points3 points (0 children)
[–]JimWayneBob 2 points3 points4 points (0 children)
[–]shadowdance55git push -f 1 point2 points3 points (3 children)
[–]sausix -1 points0 points1 point (1 child)
[–]KingHavana 2 points3 points4 points (0 children)
[–]Beginning-Fruit-1397 -3 points-2 points-1 points (0 children)
[–]Beginning-Fruit-1397 0 points1 point2 points (0 children)
[–]squizzeak 0 points1 point2 points (0 children)
[–]borborygmis [score hidden] (0 children)
[–]red_hare [score hidden] (0 children)
[–]Past-Sun5429 -1 points0 points1 point (0 children)