Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Tue, 24 Nov 2015 18:32:05 +0100 Lines: 22 Message-ID: References: <564df258$0$1604$c3e8da3$5496439d@news.astraweb.com> <8601c9af-a7d9-4642-ba1c-8edd1e4c3390@googlegroups.com> <56546985.8060704@rece.vub.ac.be> <56547337.4000709@rece.vub.ac.be> <56547C53.8030407@rece.vub.ac.be> <5654864E.2070906@rece.vub.ac.be> <56549324.8020607@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de fuUGFXrzuodF+R6OTKnW5gmaqCV6hhaDH3iBz/tOdj2g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.039 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'definition,': 0.09; 'python:': 0.09; 'enumerates': 0.16; 'grounds': 0.16; 'literal.': 0.16; 'literals': 0.16; 'notations': 0.16; 'received:adsl- dyn.isp.belgacom.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'byte': 0.18; 'constant': 0.22; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'values': 0.28; 'argue': 0.29; 'received:192.168.1.3': 0.29; 'types.': 0.29; 'starts': 0.29; 'code': 0.30; 'received:be': 0.30; 'related': 0.32; 'url:python': 0.33; 'point,': 0.33; 'though.': 0.33; 'confirmed': 0.35; 'too': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:192': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'url:3': 0.60; 'charset:windows-1252': 0.62; 'limited.': 0.67; 'received:195.238': 0.84; 'schreef': 0.84; 'url:reference': 0.91 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CWAQA5nlRW/9Xi9VENUYQOb8AvIYVuAoF9EQEBAQEBAQGFPwEBAwGBCQshJQ8CRhMIAogiDQitG40AhBMBAQEHAQEBARsEhlSEfoQ0c4QSBZZQhSSIDZxLN4QxcQGDYIFKAQEB User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.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:99372 Op 24-11-15 om 17:56 schreef Ian Kelly: > >> So on what grounds would you argue that () is not a literal. > > This enumerates exactly what literals are in Python: > > https://docs.python.org/3/reference/lexical_analysis.html#literals > > I think it's a rather pedantic point, though. How are nuances of the > grammar at all related to user expectations? > I think that enumaration is too limited. The section starts with: Literals are notations for constant values of some built-in types. () satisfies that definition, which is confirmed by the byte code produced for it. -- Antoon.