Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: MRAB Newsgroups: comp.lang.python Subject: Re: Problems using struct pack/unpack in files, and reading them. Date: Sun, 15 Nov 2015 00:49:33 +0000 Lines: 16 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; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de isxBLoB6NLewEZhCKAsXhgAvXLuTkU3x6Kwn5O73cg7Q== 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; 'literal': 0.09; 'minus': 0.09; 'subject:files': 0.09; 'subject:using': 0.09; 'python': 0.10; 'syntax': 0.13; 'calculator': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Problems': 0.16; 'unary': 0.16; 'wrote:': 0.16; 'copied': 0.18; 'all,': 0.20; 'ascii': 0.22; 'suppose': 0.22; 'programming': 0.22; 'elements': 0.23; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'question': 0.27; 'specify': 0.27; 'subject:/': 0.30; 'e.g.': 0.30; 'received:84': 0.32; 'useful': 0.33; 'symbol': 0.33; 'languages': 0.34; 'could': 0.35; 'something': 0.35; 'but': 0.36; 'basic': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'school': 0.62; 'real': 0.62; 'different': 0.63; '*really*': 0.84; 'actually,': 0.84; 'elementary': 0.84; 'subject:pack': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=MbeRwMLf c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=IkcTkHD0fZMA:10 a=KaybevnVAAAA:8 a=fEXDGj_XetUC_NYw5wgA:9 a=QEXdDO2ut3YA:10 X-AUTH: mrabarnett@:2500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: 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:98833 On 2015-11-14 22:53, Random832 wrote: > 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"? > > I suppose you could use some *different* symbol in the literal syntax > for negative numbers. I had a calculator once that used a different > symbol (looked like a small superscript minus sign) for it. But Python > is limited to ASCII for basic syntax elements for good reasons. > APL uses "¯" ('\N{MACRON}'), e.g. "¯1".