Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: Problems using struct pack/unpack in files, and reading them. Date: Sat, 14 Nov 2015 10:13:18 -0700 Lines: 10 Message-ID: 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; charset=UTF-8 X-Trace: news.uni-berlin.de uyRMwnV0cxJnZ7jLo/f1DwvV5ggqjzE9kBCKPqTPIcLQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; '-1,': 0.09; '-1.': 0.09; 'subject:files': 0.09; 'subject:using': 0.09; 'received:io': 0.16; 'received:psf.io': 0.16; 'side.': 0.16; 'silly': 0.16; 'subject:Problems': 0.16; 'unary': 0.16; 'wrote:': 0.16; 'integer': 0.18; '>': 0.18; 'email addr:gmail.com>': 0.18; '2015': 0.20; 'am,': 0.23; 'seems': 0.23; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; '14,': 0.27; 'division': 0.29; 'subject:/': 0.30; '15,': 0.30; 'received:google.com': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'skip:z 10': 0.38; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'results': 0.66; 'subject:pack': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=gYhFJb/IMgxbJ7oVxcSHbPNgIHlPlRUmtPy5xKBwdaI=; b=Au6EMN0WGziVRKsD7w1Xoe7T1XN9jGA78N0TJcWFdaWYJQEmc8mWLusvXQqLkmiXhN mDpKE78TBvMuHEuQwu6qPYqXqExAl36zOlGj/O27el5e9xc2Lp9wNsgqt/COLGelOstW F5znWUoPSRi4hQMOzo9k+BzxHCHxXm+tWBgruLv1xaIDqldbqoyYy8vf8jqJpCBrnzUX WbP+Lw55z1UyIdmJlMxrJQ3gK4sxowMec4wPpOg7LgORkAfPKKEVcJp9BD6N54Tuzh5P oRJsDtNGQB/1H+DAN+Rka0nDTJ0gGkBikWz/ZBcieD/lgvsM4LpWtq3OMJKjsBKMvRch 04rw== X-Received: by 10.107.164.154 with SMTP id d26mr26144401ioj.111.1447521199449; Sat, 14 Nov 2015 09:13:19 -0800 (PST) In-Reply-To: X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98820 On Nov 14, 2015 10:10 AM, "Chris Angelico" wrote: > > On Sun, Nov 15, 2015 at 4:04 AM, Ian Kelly wrote: > > Unary integer division seems pretty silly since the only possible results > > would be 0, 1 or -1. > > 1, -1, or ZeroDivisionError. The zero's on the other side. But yes. // 42 == 1 // 42 == 0