Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45648
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; ';-)': 0.03; 'offline': 0.03; 'yet.': 0.04; '21,': 0.07; 'subject:Question': 0.07; 'check,': 0.09; 'forcing': 0.09; 'subject:skip:a 10': 0.09; 'sure,': 0.09; 'type,': 0.09; 'vast': 0.09; 'yeah,': 0.09; 'arbitrarily': 0.16; 'bracket': 0.16; 'brackets': 0.16; 'chris,': 0.16; 'clause.': 0.16; 'clauses': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'interpreter,': 0.16; 'nesting': 0.16; 'renders': 0.16; 'underlying': 0.16; 'url.': 0.16; 'alpha': 0.16; 'all.': 0.16; 'wrote:': 0.18; '(not': 0.18; 'work,': 0.20; 'tests': 0.22; 'builder': 0.24; 'mind.': 0.24; 'options': 0.25; 'push': 0.26; 'query': 0.26; 'least': 0.26; 'certain': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'points': 0.29; '(like': 0.30; 'charged': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'work.': 0.31; 'gives': 0.31; 'lines': 0.31; 'software,': 0.31; 'bad.': 0.31; 'ordinary': 0.31; 'steven': 0.31; "they'll": 0.31; 'front': 0.32; 'another': 0.32; 'cases': 0.33; 'except': 0.35; 'requirement': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'there': 0.35; 'really': 0.36; 'dance': 0.36; 'his/her': 0.36; 'in.': 0.36; 'oracle': 0.36; "i'll": 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'that,': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'users': 0.40; 'according': 0.40; 'even': 0.60; 'skip:u 10': 0.60; 'ground': 0.60; 'simple,': 0.60; 'most': 0.60; 'tell': 0.60; 'free': 0.61; 'full': 0.61; 'range': 0.61; 'simple': 0.61; "you're": 0.61; 'times': 0.62; 'our': 0.64; 'more': 0.64; 'assistance': 0.66; 'here': 0.66; 'frank': 0.68; 'line,': 0.68; 'business': 0.70; 'hey,': 0.75; 'australia,': 0.84; 'complexity': 0.84; 'hard.': 0.84; 'us?': 0.84; 'exposing': 0.91; 'convinced': 0.93; 'dirty': 0.93; 'hands': 0.96; 'online,': 0.96; '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=4MFJJQXN/fkZbMHYdoXvW4/9Cz3ImDu7aU/vT02xXZE=; b=yic3TGussiCQRSxeDp/2BuqmKk0/v4AEwynrMmQfvwwL3+2j2rCMD+pA2snMtbuIwg wK1uStgTzNGYSNvQoD1I7u7UKlu/kbNpvq4ob+YnxlFZzY1Glttv287+muCeFAjdR4rG oesR21tLJPNWHPbz3s3vil7l3mE4gQolDAmB/OTgtjsHKAlyxpw/KFEiqbL9/SjD4q7V vvEoYGoAgthiMA/G811jJfV1tyUhDs/EIvIhPmol9DlPDTL1WX4l08pquGtrxITVvZQZ zwz65UtICFvE0SqsnMe/KMoa4VmubBlXn2Mm7CsQIDWVwq309NJ4uLLxnijZvcdew6Yx uY4w== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.111.133 with SMTP id s5mr400679vcp.63.1369121740702; Tue, 21 May 2013 00:35:40 -0700 (PDT) |
| In-Reply-To | <knf57c$en5$1@ger.gmane.org> |
| References | <knci07$jol$1@ger.gmane.org> <BLU176-W37EB377C73CD6D7306247DD7AF0@phx.gbl> <knckj0$cft$1@ger.gmane.org> <CAPTjJmpb073XFH5ksNhzRyAJNSJF=6WNq5pGzed4PXqBrJBN=A@mail.gmail.com> <knclk6$lva$1@ger.gmane.org> <knd88q$mo9$1@ger.gmane.org> <CAPTjJmqiuKrnsfMgJLn5SZbJ=GuErfb=LdJGPB_kQYyT+KSw_g@mail.gmail.com> <knf57c$en5$1@ger.gmane.org> |
| Date | Tue, 21 May 2013 17:35:40 +1000 |
| Subject | Re: Question about ast.literal_eval |
| 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.1907.1369121743.3114.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369121743 news.xs4all.nl 15899 [2001:888:2000:d::a6]:54966 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:45648 |
Show key headers only | View raw
On Tue, May 21, 2013 at 4:46 PM, Frank Millman <frank@chagford.com> wrote: > You may be right, Chris, but I don't think my approach is all that bad. Frankly, I'm not altogether convinced that our approach is right either :) But like the Oracle in the Matrix, I'm not here to push you to one decision or another so much as to just put the options in front of you and let you make up your own <bowdlerized> mind. Except in a few cases where I'm really certain of my ground (like "don't put any untrusted data through eval()"...). > The vast majority of tests will be simple - either a single line, or two > lines for a range check, with no brackets at all. > > If the requirement is more complicated than that, well, I don't think the > complication can be avoided, and at least this approach gives full control. Yeah, and this is where the issue of complexity points comes in. You're spending a lot of them on functionality that most users won't even use, and those who do will use only occasionally. You're forcing them to match their brackets (not just have the same number of each type, but also to get the nesting correct), and according to your current spec, there can be no more than one open/close bracket at each condition, so they'll have to arbitrarily add dummy conditions to make certain forms of nesting work. You're exposing a lot of the underlying interpreter, while forcing the user to dance wearing a body cast. Sure, it can work, but it's unnecessarily hard. > FWIW, I use the same approach to allow users to construct their own WHERE > clauses in custom views. Again, the vast majority are simple, but there are > times when it can get complicated. Our alpha system is actually online, and we have exactly that system - a query builder that renders down to a WHERE clause. If you're curious, message me offline and I'll give you the URL. > The proof of the pudding will be when I try to get ordinary users to get > their own hands dirty - I am not there yet. If I ever get this released, the > business model will be free software, but support will be charged for. So if > a user gets out of his/her depth, there will be assistance available. > > Time will tell who is right ... ;-) Who is right, and who is dead. Hey, are you aware that both Steven and I come from Australia, and that we are used to having people not trust us? Truly, you have a dizzying intellect! ChrisA ... couldn't resist...
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Question about ast.literal_eval Chris Angelico <rosuav@gmail.com> - 2013-05-21 17:35 +1000
csiph-web