Helper function for delegating arguments to Python string functions. Many of the Python string operations that have optional arguments do not use 'None' to indicate a default value. In these cases, we need to remove all None arguments, and those following them.
(*args)
| 125 | |
| 126 | |
| 127 | def _clean_args(*args): |
| 128 | """ |
| 129 | Helper function for delegating arguments to Python string |
| 130 | functions. |
| 131 | |
| 132 | Many of the Python string operations that have optional arguments |
| 133 | do not use 'None' to indicate a default value. In these cases, |
| 134 | we need to remove all None arguments, and those following them. |
| 135 | """ |
| 136 | newargs = [] |
| 137 | for chk in args: |
| 138 | if chk is None: |
| 139 | break |
| 140 | newargs.append(chk) |
| 141 | return newargs |
| 142 | |
| 143 | |
| 144 | def _multiply_dispatcher(a, i): |