input is a tuple. Example: (a, b, c) --> [a, b, c] (a) --> [a] ([a, b, c]) --> [a, b, c]
(input)
| 37 | |
| 38 | |
| 39 | def _MakeList(input): |
| 40 | """ input is a tuple. |
| 41 | Example: |
| 42 | (a, b, c) --> [a, b, c] |
| 43 | (a) --> [a] |
| 44 | ([a, b, c]) --> [a, b, c] |
| 45 | """ |
| 46 | if len(input) == 0: |
| 47 | raise ValueError( |
| 48 | 'input cannot be empty.') |
| 49 | elif len(input) == 1: |
| 50 | output = input[0] |
| 51 | if not isinstance(output, list): |
| 52 | output = [output] |
| 53 | else: |
| 54 | output = list(input) |
| 55 | return output |
| 56 | |
| 57 | |
| 58 | def _IsNets(nets_or_steps): |
no test coverage detected
searching dependent graphs…