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)
| 71 | |
| 72 | |
| 73 | def _clean_args(*args): |
| 74 | """ |
| 75 | Helper function for delegating arguments to Python string |
| 76 | functions. |
| 77 | |
| 78 | Many of the Python string operations that have optional arguments |
| 79 | do not use 'None' to indicate a default value. In these cases, |
| 80 | we need to remove all None arguments, and those following them. |
| 81 | """ |
| 82 | newargs = [] |
| 83 | for chk in args: |
| 84 | if chk is None: |
| 85 | break |
| 86 | newargs.append(chk) |
| 87 | return newargs |
| 88 | |
| 89 | def _get_num_chars(a): |
| 90 | """ |
no outgoing calls
no test coverage detected