Create a Sequence using a sequential ExecutionEngine. If args has more than one argument then the argument list becomes the sequence. If args[0] is primitive, a sequence wrapping it is created. If args[0] is a list, tuple, iterable, or Sequence it is wrapped as a
(self, *args, **kwargs)
| 27 | self.max_repr_items = max_repr_items |
| 28 | |
| 29 | def __call__(self, *args, **kwargs): |
| 30 | """ |
| 31 | Create a Sequence using a sequential ExecutionEngine. |
| 32 | |
| 33 | If args has more than one argument then the argument list becomes the sequence. |
| 34 | |
| 35 | If args[0] is primitive, a sequence wrapping it is created. |
| 36 | |
| 37 | If args[0] is a list, tuple, iterable, or Sequence it is wrapped as a Sequence. |
| 38 | |
| 39 | :param args: Sequence to wrap |
| 40 | :return: Wrapped sequence |
| 41 | """ |
| 42 | # pylint: disable=no-self-use |
| 43 | engine = ExecutionEngine() |
| 44 | return self._parse_args( |
| 45 | args, engine, "seq() takes at least 1 argument ({0} given)" |
| 46 | ) |
| 47 | |
| 48 | def _parse_args(self, args, engine, error_message): |
| 49 | if len(args) == 0: |
nothing calls this directly
no test coverage detected