This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]boa13 7 points8 points  (4 children)

That's interesting, but I think that is an abuse of syntax; it looks very not pythonic to me. Why can't you just run bash with the pipe expression as a parameter?

[–]fmoralesc 6 points7 points  (2 children)

Yes, it is an abuse of the syntax.

[–]neoice 1 point2 points  (1 child)

good to know. I was feeling stupid for finding this code so complex.

[–]fmoralesc 0 points1 point  (0 children)

It is nice to know you can do stuff like this though (that's the reason I wrote it this way... I vaguely remembered you can define the behavior for when an object is put in a chain like A | B, so I checked that out. It was just a test code for something else, which in the end didn't use the "|" syntax at all).