Skip to content

Commit be198a6

Browse files
authored
Merge pull request #350 from eriknw/correct_flip_doctest
Update the doctests for `flip` to render correctly in Python 2 and 3.
2 parents a09242b + ef85a81 commit be198a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

toolz/functoolz.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,13 +617,13 @@ def flip(func, a, b):
617617
This function is curried.
618618
619619
>>> def div(a, b):
620-
... return a / b
620+
... return a // b
621621
...
622-
>>> flip(div, 2, 1)
623-
0.5
622+
>>> flip(div, 2, 6)
623+
3
624624
>>> div_by_two = flip(div, 2)
625625
>>> div_by_two(4)
626-
2.0
626+
2
627627
628628
This is particularly useful for built in functions and functions defined
629629
in C extensions that accept positional only arguments. For example:

0 commit comments

Comments
 (0)