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


Groups > comp.lang.python > #45782

Re: Newbie question about evaluating raw_input() responses

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'interpreter.': 0.07; 'hiding': 0.09; 'subject:question': 0.10; 'python': 0.11; 'jan': 0.12; '(without': 0.16; '23,': 0.16; 'arbitrarily': 0.16; 'bullet': 0.16; 'dangerous,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'presume': 0.16; 'reedy': 0.16; 'weird.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'thu,': 0.19; '>>>': 0.22; 'input': 0.22; 'switch': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'label': 0.30; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'option': 0.32; 'text': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'building': 0.35; 'really': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'dangerous': 0.60; 'regexp': 0.84; '2013': 0.98
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:to :content-type; bh=UoapXpnwh1+veJ8Ki6fKLszuH1XYOMfe42v/J9gUROo=; b=OJ0YuFqRytmQymNiZs8QvSyMUuz7nllLZ6bljuckB9brg80BmY5UZR4QSViI1qTui9 /3zQPagWQJEyqTBC9lm8dEwXFrPX/Y5BHEQD+ranzoZon7ukLb2ndWF25XVzzGwbreTP MuobZ/NtvoREplMMtMub7P3soEo9EF0L94DCJpgIfBOUWiKgUCjHoaio86hRWDKnmkQN waDmXL+/EvuR0qfozu09CiwtnFtHs1lW10II2mTE3BmAxw1zjnnbLWhYdyVQdZO0uIN2 MXzbgXucJbOwtf3esyEXPwaGvzzUIgLYo4JQkTofWER62i0CmA6FFuIpnxp2hTLPFAba 84bQ==
MIME-Version 1.0
X-Received by 10.220.111.133 with SMTP id s5mr4365083vcp.63.1369293620003; Thu, 23 May 2013 00:20:20 -0700 (PDT)
In-Reply-To <knkfeh$rr4$1@ger.gmane.org>
References <534d7800-14c1-430b-85fb-dd703c2acc4d@googlegroups.com> <c8d5972d-9b11-4885-a68d-6ce1d0414718@googlegroups.com> <IGbnt.31113$LC7.15822@fx06.am4> <519d9f71$0$1591$c3e8da3$76491128@news.astraweb.com> <knkfeh$rr4$1@ger.gmane.org>
Date Thu, 23 May 2013 17:20:19 +1000
Subject Re: Newbie question about evaluating raw_input() responses
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1999.1369294009.3114.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369294009 news.xs4all.nl 15933 [2001:888:2000:d::a6]:57538
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45782

Show key headers only | View raw


On Thu, May 23, 2013 at 5:11 PM, Terry Jan Reedy <tjreedy@udel.edu> wrote:
> On 5/23/2013 12:47 AM, Steven D'Aprano wrote:
>>
>> On Wed, 22 May 2013 22:31:04 +0000, Alister wrote:
>>
>>> Please write out 1000 time (without using any form of loop)
>>>
>>> "NEVER use input in python <3.0 it is EVIL"*
>
>
>> But all joking aside, eval is dangerous, yes, but it is not "evil".
>
>
> He put that label on *input*, not eval -- I presume for hiding dangerous
> eval.

Aside: Why was PHP's /e regexp option ever implemented? I can
understand evalling inputted text - that's how you write an
interactive interpreter. But why would you arbitrarily eval the result
of a regexp replacement? That seems... really weird. Like building a
gun with a "Reverse" switch that fires the bullet down the butt
instead of the barrel.

ChrisA

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


Thread

Newbie question about evaluating raw_input() responses "C. N. Desrosiers" <cndesrosiers@gmail.com> - 2013-05-21 23:23 -0700
  Re: Newbie question about evaluating raw_input() responses Fábio Santos <fabiosantosart@gmail.com> - 2013-05-22 07:35 +0100
    Re: Newbie question about evaluating raw_input() responses "C. N. Desrosiers" <cndesrosiers@gmail.com> - 2013-05-21 23:52 -0700
  Re: Newbie question about evaluating raw_input() responses Kevin Xi <kevin.xgr@gmail.com> - 2013-05-21 23:52 -0700
    Re: Newbie question about evaluating raw_input() responses Chris Angelico <rosuav@gmail.com> - 2013-05-22 17:19 +1000
    Re: Newbie question about evaluating raw_input() responses Alister <alister.ware@ntlworld.com> - 2013-05-22 22:31 +0000
      RE: Newbie question about evaluating raw_input() responses Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-23 01:55 +0300
      Re: Newbie question about evaluating raw_input() responses Kevin Xi <kevin.xgr@gmail.com> - 2013-05-22 18:56 -0700
      Re: Newbie question about evaluating raw_input() responses Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-23 04:47 +0000
        Re: Newbie question about evaluating raw_input() responses Chris Angelico <rosuav@gmail.com> - 2013-05-23 16:04 +1000
        Re: Newbie question about evaluating raw_input() responses Terry Jan Reedy <tjreedy@udel.edu> - 2013-05-23 03:11 -0400
        Re: Newbie question about evaluating raw_input() responses Chris Angelico <rosuav@gmail.com> - 2013-05-23 17:20 +1000
          Re: Newbie question about evaluating raw_input() responses Nobody <nobody@nowhere.com> - 2013-05-25 19:27 +0100
            Re: Newbie question about evaluating raw_input() responses Chris Angelico <rosuav@gmail.com> - 2013-05-26 04:33 +1000
            Re: Newbie question about evaluating raw_input() responses Fábio Santos <fabiosantosart@gmail.com> - 2013-05-25 23:11 +0100
      Re: Newbie question about evaluating raw_input() responses Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-23 18:51 -0400

csiph-web