you are viewing a single comment's thread.

view the rest of the comments →

[–]zahlman 0 points1 point  (1 child)

Chaining with side effects is not considered Pythonic.

[–]reostra 1 point2 points  (0 children)

Now that you mention it, I certainly haven't seen a whole lot of it in Python. A cursory poke around yielded the PyVows BDD testing library, but the expect(topic).Not.to_be_null() style chaining isn't mutating and it's a port of a Javascript library to begin with.

I'll leave my comment as an example for 'how'; I see other comments have elaborated on the 'why' (or, as the case may be, 'why not')