Skip to content

Commit

Permalink
Merge pull request #350 from eriknw/correct_flip_doctest
Browse files Browse the repository at this point in the history
Update the doctests for `flip` to render correctly in Python 2 and 3.
  • Loading branch information
eriknw committed Nov 3, 2016
2 parents a09242b + ef85a81 commit be198a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions toolz/functoolz.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,13 @@ def flip(func, a, b):
This function is curried.
>>> def div(a, b):
... return a / b
... return a // b
...
>>> flip(div, 2, 1)
0.5
>>> flip(div, 2, 6)
3
>>> div_by_two = flip(div, 2)
>>> div_by_two(4)
2.0
2
This is particularly useful for built in functions and functions defined
in C extensions that accept positional only arguments. For example:
Expand Down

0 comments on commit be198a6

Please sign in to comment.