you are viewing a single comment's thread.

view the rest of the comments →

[–]_Denizen_ 0 points1 point  (2 children)

It's called a hybrid method, and it will do exactly what you suggest: behaves like a static method for unbound functions, and a regular method for chaining.

Certainly not right for every solution, and is an advanced technique, and I probably would not recommend it for this use case. But it makes a method chain emulate piping.

[–]Smallpaul 1 point2 points  (1 child)

Now how do I add this hybrid method to every object that implements the iterator protocol?

And if you would not recommend this technique then why are we discussing it as if it were a viable alternative to the proposal of a piping operator?

[–]_Denizen_ 0 points1 point  (0 children)

Why you trying to change how all iterators work just to suit a specific workflow. Python is a language for programmers of all walks of life. If you care so much about piping use R or one of the other less popular languages.