Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Problems using struct pack/unpack in files, and reading them. Date: Sun, 15 Nov 2015 02:12:28 +0200 Organization: A noiseless patient Spider Lines: 24 Message-ID: <876114i0ib.fsf@elektro.pacujo.net> References: <20151113192045.GA9913@z-sverige.nu> <56469f14$0$1612$c3e8da3$5496439d@news.astraweb.com> <5646c95a$0$1597$c3e8da3$5496439d@news.astraweb.com> <87vb94ikuv.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="2765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SQcQGYdSRVbMQucR2D/Rz" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:UsoBklQJMis8TAka75TR4DzBh+U= sha1:T2DYP/aZaEDKDQ0Bf8M44kcGHVU= Xref: csiph.com comp.lang.python:98831 Random832 : > Marko Rauhamaa writes: >> Actually, the real question is, is the unary - *really* so useful >> that it merits existence or is it just something that was mindlessly >> copied into programming languages from elementary school arithmetics? > > The alternative, if you want to be able to specify negative numbers at > all, is to put - in the literal syntax. So what's "x-1"? Yes, it would have to be part of the literal syntax. Or, you could do without! >>> 7 - 8 (0-1) After all, we already have: >>> 1 + 3j (1+3j) Marko