INNER CODE UNIT · Python

__iter__

webartifex/intro-to-python · 11_classes/sample_package/matrix.py:193

    def __iter__(self):
        """Loop over a Matrix's entries.

        See .entries() for more customization options.
        """
        return self.entries()

    def __reversed__(self):
        """Loop over a Matrix's entries in reverse order.

        See .entries() for more customization options.
        """
        return self.entries(reverse=True)

    def __add__(self, other):
        """Handle `self + other` and `other + self`.

        This may be either matrix addition or broadcasting addition.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…