diff --git a/docs/language/core.rst b/docs/language/core.rst index f14785c..a8952d8 100644 --- a/docs/language/core.rst +++ b/docs/language/core.rst @@ -26,8 +26,7 @@ Returns an iterator of all but the last item in *coll*. => (list (butlast [])) [] - => (import itertools) - => (list (take 5 (butlast (itertools.count 10)))) + => (list (take 5 (butlast (count 10)))) [10, 11, 12, 13, 14] @@ -994,8 +993,7 @@ Returns an iterator of all but the last *n* items in *coll*. Raises => (list (drop-last 100 (range 100))) [] - => (import itertools) - => (list (take 5 (drop-last 100 (itertools.count 10)))) + => (list (take 5 (drop-last 100 (count 10)))) [10, 11, 12, 13, 14] @@ -1288,20 +1286,17 @@ Included itertools count cycle repeat accumulate chain compress drop-while remove group-by islice *map take-while tee zip-longest product permutations combinations multicombinations --------- -All of Python's itertools are available, however some of the names have been -changed: +All of Python's `itertools `_ +are available. Some of their names have been changed: - - `starmap` has been changed to `*map` + - ``starmap`` has been changed to ``*map`` - - `combinations_with_replacement` has been changed to `multicombinations` + - ``combinations_with_replacement`` has been changed to ``multicombinations`` - - `groupby` has been changed to`group-by` + - ``groupby`` has been changed to ``group-by`` - - `takewhile` has been changed to `take-while` + - ``takewhile`` has been changed to ``take-while`` - - `dropwhile` has been changed to `drop-while` + - ``dropwhile`` has been changed to ``drop-while`` - - `filterfalse` has been changed to `remove` - - Please refer to the `Python documentation - `_ for more information. + - ``filterfalse`` has been changed to ``remove``