[Python-Dev] A Horrible Inconsistency
Georg Brandl
g.brandl at gmx.net
Thu May 25 23:54:06 CEST 2006
Georg Brandl wrote:
> Martin v. Löwis wrote:
>> Fredrik Lundh wrote:
>>> >>> -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!
>>
>> I can't find this inconsistency horrible.
>>
>> py> +"Hello"
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> TypeError: bad operand type for unary +
>> py> +1*"Hello"
>> 'Hello'
>
> Don't tell me that! I was actually working on a patch right now...
Since I've already been bombarded with questions by some fellow Germans (which
once again prove that they've got no sense of humour at all ;): this
was a joke.
georG
More information about the Python-Dev
mailing list