Skip to content

Commit ef85a81

Browse files
committed
Update the doctests for flip to render correctly in Python 2 and 3.
This doesn't fix the problem of doctests on curried objects not running.
1 parent ba9a270 commit ef85a81

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)