Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: Using the Python Interpreter as a Reference Date: 28 Nov 2011 20:20:36 GMT Organization: Norwich University Lines: 19 Message-ID: <9ji8okFs94U2@mid.individual.net> References: <79379487-0081-4067-92ed-c6717652e1ff@y7g2000vbe.googlegroups.com> <4eb0af60-26b3-45d5-8aff-566505003d6a@m10g2000vbc.googlegroups.com> <4ed2cddc$0$29988$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net pS32YroZqrfB8A5pwytN/ghIjRYYJsowAgFYYl1YTCV2Od0S4C Cancel-Lock: sha1:oXuNSpMj9KjSWgHKZzg0VcHr15c= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16349 On 2011-11-28, Ian Kelly wrote: > I think the implication is that Unit has only one syntax for > creating functions, which is lambda-style. In any case, why > does Python require a special keyword? def is only used in a > statement context, and lambda is only used in an expression > context. Why not use the same keyword for both? I think the > answer is historical: def came first, and when anonymous > functions were added it didn't make sense to use the keyword > "def" for them, because "def" implies a name being defined. I've always held with the "anti-functional style conspiracy" interpretation of Python's lambda expressions. They were added but grudgingingly, made weak on purpose to discourage their use. -- Neil Cerutti "This room is an illusion and is a trap devisut by Satan. Go ahead and dauntlessly! Make rapid progres!" --Ghosts 'n Goblins