Path: csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail From: MRAB Newsgroups: comp.lang.python Subject: Re: Late-binding of function defaults (was Re: What is a function parameter =[] for?) Date: Thu, 26 Nov 2015 16:14:21 +0000 Lines: 35 Message-ID: References: <87d1v5emhl.fsf@elektro.pacujo.net> <564e6a62$0$1620$c3e8da3$5496439d@news.astraweb.com> <565592e9$0$1615$c3e8da3$5496439d@news.astraweb.com> <87k2p54tdr.fsf@elektro.pacujo.net> <565652e1$0$1619$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 3JqlKGOFx/IoACHZXUb00QV0RoVg6HrHzfjHqJUpiICw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'binary': 0.05; '"r"': 0.09; '(ie.': 0.09; 'example:': 0.10; 'python': 0.10; 'jan': 0.11; 'language,': 0.11; 'interpreter': 0.15; 'subject: \n ': 0.15; 'thu,': 0.15; 'binary,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'fwiw': 0.16; 'literals.': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'mistake.': 0.16; 'octal': 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; 'simpler,': 0.16; 'subject:?)': 0.16; 'typo': 0.16; 'workings': 0.16; 'wrote:': 0.16; '>>>': 0.20; '2015': 0.20; 'purposes': 0.20; 'month,': 0.22; 'bit': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'example': 0.26; 'chris': 0.26; 'compare': 0.27; '(although': 0.29; 'document,': 0.29; 'allows': 0.30; 'received:84': 0.32; 'changed': 0.33; 'useful': 0.33; '(for': 0.34; 'languages': 0.34; 'handle': 0.34; 'list': 0.34; 'so,': 0.35; 'could': 0.35; 'attempt': 0.35; 'nov': 0.35; 'but': 0.36; 'smaller': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'skip:4 10': 0.38; 'mean': 0.38; 'represent': 0.38; 'means': 0.39; 'received:192': 0.39; 'subject:-': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'more': 0.63; 'different': 0.63; 'complete': 0.63; 'between': 0.65; 'here': 0.66; '26,': 0.72; 'syntax?': 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=5ANokUeuAAAA:8 a=fGO4tVQLAAAA:8 a=XnnwMoOWckAxwpT2O1gA: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:99587 On 2015-11-26 14:40, BartC wrote: > On 26/11/2015 13:15, Chris Angelico wrote: >> On Thu, Nov 26, 2015 at 11:53 PM, BartC wrote: >>> FWIW here is that list of features that are different between Python and my >>> language, or that work a different way, or that I think could be a useful >>> addition. (Although Python's internal workings make many impractical.) >>> >>> http://pastebin.com/JrVTher6 >>> >>> This is not an attempt to compare the complete languages as they are for >>> different purposes (mine is more low-level, simpler, smaller and designed to >>> make it easier to create an efficient byte-code interpreter for it). >> >> "I think Python now has hex, octal and binary literals. X allows any >> base from 2 to 16: 2x10101 is binary, while 4x101 is quaternary (ie. >> 20)." >> >> Do you mean that 4x101 means 1*(4*4) + 0*(4) + 1? If so, it would be >> 17, not 20. Is this a typo in the document, or am I misunderstanding >> your syntax? > > Just a mistake. The example had been 4x100 which is 16, but I changed it > to 4x101 for a bit less confusion, which as you say is 17 not 20 which > is 4x110. > > (Although not used much, I have used quaternary here for example: > > 4x3032_3233_2323 > > The digits represent the number of extra days more than 28 in each > month, from Jan to Dec.) > Smalltalk uses "r" (for "radix") rather than "x", and can handle any base from 2 to 36.