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

Ian Kelly ian.g.kelly at gmail.com
Fri Nov 13 22:45:31 EST 2015


On Nov 13, 2015 8:03 PM, "Chris Angelico" <rosuav at gmail.com> wrote:
>
> 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?

It forces a Counter to contain only positive counts?



More information about the Python-list mailing list