On 10 March 2014 10:59, Steven D'Aprano <steve@pearwood.info> wrote:Yes it does. It also does the same for "complex literals" even though
> On Mon, Mar 10, 2014 at 10:07:11AM +0000, Oscar Benjamin wrote:
>> On 9 March 2014 20:39, Guido van Rossum <guido@python.org> wrote:
>> > On Sun, Mar 9, 2014 at 1:07 PM, Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
>> >>
>> >> The problem though is with things like +3.14d or -3.14d. Python the
>> >> language treats the + and - signs as not being part of the literal but
>> >> as separate unary operators.
>
> Is that still true? Possibly the peephole optimizer has changed the
> situation?
the language formally only defines imaginary literals.
>>> type(-9223372036854775808)
<type 'int'>
>>> type(-(9223372036854775808))
<type 'long'>