On Wed, Feb 10, 2010 at 8:24 AM, Gökhan Sever <gokhanse...@gmail.com> wrote:
> Self-correction: > > It works correctly in IPython-dev as well. > > And further in Python 2.6.2: > >>>> p = () >>>> p > () >>>> type(p) > <type 'tuple'> >>>> type((a*b)) > <type 'numpy.ndarray'> > > ( ) doesn't only works as a tuple operator. It also has its original > parenthesis functionality :) I think this is the rule: When empty it is a tuple; when containing one item it is parentheses unless there is a comma. >> p = (9) >> type(p) <type 'int'> >> p = (9,) >> type(p) <type 'tuple'> _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion