def modules(self):
        """A list of the modules, with 0 representing a bar and 1 representing a space.

        >>> barcode = Code128("Hello!", charset='B')
        >>> barcode.modules  # doctest: +ELLIPSIS
        [0, 0, 1, 0, 1, 1, 0, 1, ..., 0, 0, 0, 1, 0, 1, 0, 0]

        :rtype: list[int]
        """
        def _iterate_modules(bars):
            is_bar = True
            for char in map(int, bars):
                while char > 0:
                    char -= 1
                    yield 0 if is_bar else 1
                is_bar = not is_bar

        return list(_iterate_modules(self.bars))
A list of the modules, with 0 representing a bar and 1 representing a space.

        >>> barcode = Code128("Hello!", charset='B')
        >>> barcode.modules  # doctest: +ELLIPSIS
        [0, 0, 1, 0, 1, 1, 0, 1, ..., 0, 0, 0, 1, 0, 1, 0, 0]

        :rtype: list[int]