Problems using struct pack/unpack in files, and reading them.

Chris Angelico rosuav at gmail.com
Fri Nov 13 22:01:41 EST 2015


On Sat, Nov 14, 2015 at 1:40 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Sat, 14 Nov 2015 09:42 am, Chris Angelico wrote:
>
>> However, this is a reasonable call for the abolition of unary plus...
>
> The only way you'll take unary plus out of Python is by prying it from my
> cold, dead hands.
>
>
> BTW, unary minus suffers from the same "problem":
>
> x =- y  # oops, meant x -= y
>
> If anything, this is an argument against the augmented assignment
> short-cuts, rather than the operators.

Yes, unary minus has the same issue - but it's a lot more important
than unary plus is. In ECMAScript, unary plus means "force this to be
a number"; what's its purpose in Python?

ChrisA



More information about the Python-list mailing list