'Returns a list of tuples with lower and upper range of each index.
If an index does not define the data members upper and lower, the
corresponding slot in the list contains ``None`` instead of a tuple.
Examples
>>> from sympy import Indexed,Idx, symbols
>>> Indexed(\'A\', Idx(\'i\', 2), Idx(\'j\', 4), Idx(\'k\', 8)).ranges
[(0, 1), (0, 3), (0, 7)]
>>> Indexed(\'A\', Idx(\'i\', 3), Idx(\'j\', 3), Idx(\'k\', 3)).ranges
[(0, 2), (0, 2), (0, 2)]
>>> x, y, z = symbols(\'x y z\', integer=True)
>>> Indexed(\'A\', x, y, z).ranges
[None, None, None]'

@property
def ranges(self):

    ranges = []
    for i in self.indices:
        try:
            ranges.append(Tuple(i.lower, i.upper))
        except AttributeError:
            ranges.append(None)
    return ranges
