Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51742

Re: Lambda function Turing completeness

References <mailman.17.1375272465.1251.python-list@python.org> <51f9f86b$0$30000$c3e8da3$5496439d@news.astraweb.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2013-08-01 11:05 -0600
Subject Re: Lambda function Turing completeness
Newsgroups comp.lang.python
Message-ID <mailman.81.1375376758.1251.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Jul 31, 2013 at 11:55 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Wed, 31 Jul 2013 13:53:26 +0700, Musical Notation wrote:
>
>> Is it possible to write a Turing-complete lambda function (which does
>> not depend on named functions) in Python?
>
>
> lambda s: eval(s)

eval is a named function.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Lambda function Turing completeness Musical Notation <musicdenotation@gmail.com> - 2013-07-31 13:53 +0700
  Re: Lambda function Turing completeness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-01 05:55 +0000
    Re: Lambda function Turing completeness Ian Kelly <ian.g.kelly@gmail.com> - 2013-08-01 11:05 -0600
  Re: Lambda function Turing completeness Piet van Oostrum <piet@vanoostrum.org> - 2013-08-24 19:45 -0400
    Re: Lambda function Turing completeness Piet van Oostrum <piet@vanoostrum.org> - 2013-08-24 20:30 -0400

csiph-web