Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Problems using struct pack/unpack in files, and reading them. Date: Mon, 16 Nov 2015 19:11:13 +1300 Lines: 12 Message-ID: References: <56469f14$0$1612$c3e8da3$5496439d@news.astraweb.com> <5646c95a$0$1597$c3e8da3$5496439d@news.astraweb.com> <87vb94ikuv.fsf@elektro.pacujo.net> <5647dc88$0$1592$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 23Guufacf2aREHPmIet7xQDgu4bvyqnOpwH3js8MrIg8cAZVwr Cancel-Lock: sha1:d5x0xs16Z5AEgOmIbb58fDINDJ8= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:98865 Dennis Lee Bieber wrote: > And we'd be left looking for a symbol for bitwise inversion. Who needs negation when you have bitwise inversion? minusx = ~x + 1 I know, it doesn't work for floats, but that's just a simple matter of defining ~ on floats appropriately... -- Greg