Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Thu, 26 Nov 2015 22:24:44 +1100 Lines: 21 Message-ID: References: <56550273$0$1585$c3e8da3$5496439d@news.astraweb.com> <5655f27b$0$1614$c3e8da3$5496439d@news.astraweb.com> <6imd5b9it55sucrcl95o95tppro7errfsi@4ax.com> <871tbdf2o0.fsf@elektro.pacujo.net> <70qd5b9lbtjlsotn7d21gor4rd67o79ou7@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de b3sS6c/qcWU0sqC00kwazwVKuqR0nYbiE7VjZASvjszQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'value,': 0.03; 'objects,': 0.07; 'pypy': 0.07; 'cc:addr:python-list': 0.09; 'exiting': 0.09; 'pointers': 0.09; 'stored': 0.10; 'thu,': 0.15; 'value.': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'invalid.': 0.16; 'presume': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; "variable's": 0.16; 'wrote:': 0.16; 'translation': 0.16; 'memory': 0.17; 'numerical': 0.18; '>>>': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'seems': 0.23; 'unlike': 0.23; 'header:In-Reply-To:1': 0.24; 'figure': 0.27; 'message-id:@mail.gmail.com': 0.27; 'objects': 0.29; "i'm": 0.30; 'getting': 0.33; 'received:google.com': 0.35; 'i.e.': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'some': 0.40; 'safe': 0.63; 'compliant': 0.66; "they're": 0.66; '26,': 0.72; 'chrisa': 0.84; 'farrance': 0.84; 'to:none': 0.91 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:cc :content-type; bh=1yIPCP4P3hu5wbaMV3GFeAbkCa9Xebmv410lYh/n8Ww=; b=tbzPrRR/LmGkcORO5hH5Ayng5KeD09zax0Mniz6kE+jCzESVyPNGydRFKOc5uGNX11 8pmK2JlDExufmaVa5caOauUIVaBjxF+zfyALs+PUYRGALp7SOrsJeX54OUgCzFAP9UnR csU0Pvj1UkOMGVdcwgURw2H/2arVyITRhVrK3WOimexj6ta+YFfZih3ezVJNb/qTHnOg TUkTUFjKMVodf6RNcinNmNw7JoPOsbT7nKixab6TIPq5wtx37yj+q0nHoo0J95sqUjpC HnfYX0PtQLJ/Xg3rauSI2QaoVyh0VWLAbDh2cZ6MeApF87q667RK9OydP6NdSYo4ycqC 7wrA== X-Received: by 10.50.87.71 with SMTP id v7mr2527608igz.92.1448537085054; Thu, 26 Nov 2015 03:24:45 -0800 (PST) In-Reply-To: <70qd5b9lbtjlsotn7d21gor4rd67o79ou7@4ax.com> 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:99559 On Thu, Nov 26, 2015 at 10:12 PM, Dave Farrance wrote: > Marko Rauhamaa wrote: > >>Dave Farrance : >> >>> (Conversely, I see that unlike CPython, all PyPy's numbers have >>> unchanging ids, even after exiting PyPy and restarting, so it seems >>> that PyPy's numerical ids are "faked".) >> >>What's a faked id? > > You can figure out what I'm getting at -- i.e. I presume that the ids > are not pointers to stored numbers in memory (as with CPython) but are a > translation of the numerical variable's value. As long as they're unique among concurrently-existing objects, that's fully compliant and not at all invalid. It might be generated in some way from its value, but that's safe as long as there's a scheme that keeps all other objects away from them. ChrisA