[Fredrik]
>  >>> -1 * (1, 2, 3)
> ()
>  >>> -(1, 2, 3)
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> TypeError: bad operand type for unary -
>
> We Really Need To Fix This!

What's broken?  It's generally true that

    n*s == s*n == empty_container_of_type_type(s)

whenever s is a sequence and n is an integer <= 0.  The above is just
an instance of that.  See footnote 2 in Library Ref section 2.3.6
Sequence Types.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to