You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/enhancements.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,10 +82,10 @@ A context manager is also available:
82
82
83
83
`itertools` is extended with the following items:
84
84
85
-
-`product2`: this is an improvement of the original `product`, also handling generators
86
-
-`reset`: given a generator function decorated by `resettable`, this functions can reset a generator instantiated by this function
87
-
-`resettable`: decorator for registering the reference to the generator function and its arguments used to make a generator, then making resettable each generator made by this function
88
-
-`NonResettableGeneratorException`: specific exception for handling a generator not decorated by `resettable` thrown while trying to reset it with the `reset` function
85
+
-`product2`: this is an improvement of the original `product`, also handling generators.
86
+
-`reset`: given a generator function decorated by `resettable`, this functions can reset a generator instantiated by this function.
87
+
-`resettable`: decorator for registering the reference to the generator function and its arguments used to make a generator, then making resettable each generator made by this function.
88
+
-`NonResettableGeneratorException`: specific exception for handling a generator not decorated by `resettable` thrown while trying to reset it with the `reset` function.
89
89
90
90
-----
91
91
@@ -114,8 +114,8 @@ A context manager is also available:
114
114
115
115
`random` is slightly enhanced with a few new items:
116
116
117
-
-`choice`: redefined to add an argument for an exclusion list (aim is to provide a short form instead of using list comprehension) and an extra argument for setting if an error shall be thrown when the resulting list is empty
118
-
-`randstr`: allows to generate a random string with a given length (8 by default) and alphabet
117
+
-`choice`: redefined to add an argument for an exclusion list (aim is to provide a short form instead of using list comprehension) and an extra argument for setting if an error shall be thrown when the resulting list is empty.
118
+
-`randstr`: allows to generate a random string with a given length (8 by default) and alphabet ; it also supports a 'balance' parameter that ensures that there is no character that can have more than n / (n_alphabet - 1) occurrences and a 'blocksize' parameter to enforce balancing on a per-block basis.
119
119
-`LFSR`: adds an implementation of the Linear-Feedback Shifting Register stream generator, with the possibility of recovering its parameters by setting a target and using the Berlekamp-Massey algorithm.
120
120
-`Geffe`: adds an implementation of the Geffe stream generator.
121
121
@@ -125,10 +125,10 @@ A context manager is also available:
125
125
126
126
`re` is enhanced with some new (fully lazy) functions to generate strings from regular expression patterns:
127
127
128
-
-`randstr`: generates a single random string from the input regex
129
-
-`randstrs`: provides a generator of N random strings from the input regex
130
-
-`size`: computes the number of all possible strings from the input regex
131
-
-`strings`: generates all possible strings from the input regex
128
+
-`randstr`: generates a single random string from the input regex.
129
+
-`randstrs`: provides a generator of N random strings from the input regex.
130
+
-`size`: computes the number of all possible strings from the input regex.
131
+
-`strings`: generates all possible strings from the input regex.
132
132
133
133
-----
134
134
@@ -137,8 +137,8 @@ A context manager is also available:
137
137
`string` is slightly enhanced with a few new functions:
138
138
139
139
-`shorten`: shortens a string, taking by default the terminal width, otherwise a length of 40 characters (unless user-defined), and using an end token (by default "`...`").
140
-
-`sort_natural`: sort a list of strings taking numbers into account (returns nothing)
141
-
-`sorted_natural`: return a list of strings taking numbers into account
140
+
-`sort_natural`: sort a list of strings taking numbers into account (returns nothing).
141
+
-`sorted_natural`: return a list of strings taking numbers into account.
0 commit comments