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


Groups > comp.lang.python > #64628

Re: Case insensitive exists()?

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <larry.martell@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; 'causing': 0.04; 'correct.': 0.07; 'debugging': 0.07; 'rename': 0.07; 'see.': 0.07; '22,': 0.09; 'app,': 0.09; 'slow.': 0.09; 'django': 0.11; 'jan': 0.12; '23,': 0.16; 'query,': 0.16; 'subject:Case': 0.16; 'subject:exists': 0.16; 'subject:insensitive': 0.16; 'apps': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'thu,': 0.19; 'input': 0.22; 'coding': 0.22; 'to:name:python-list@python.org': 0.22; "i've": 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'fixed': 0.29; 'chris': 0.29; 'character': 0.29; 'matching': 0.30; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'serve': 0.31; 'easy,': 0.31; 'larry': 0.31; 'this.': 0.32; 'run': 0.32; 'another': 0.32; 'guess': 0.33; 'could': 0.34; 'problem': 0.35; 'problem.': 0.35; 'something': 0.35; 'definition': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'done': 0.36; 'doing': 0.36; 'entry': 0.36; 'thanks': 0.36; "i'll": 0.36; 'changing': 0.37; 'too': 0.37; 'list': 0.37; 'mapping': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'issue': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'users': 0.40; 'serving': 0.60; 'simply': 0.61; 'back': 0.62; 'name': 0.63; 'high': 0.63; 'today': 0.64; 'more': 0.64; 'revealed': 0.68; 'user,': 0.69; 'receive': 0.70; 'qualified': 0.72; 'browser.': 0.78; 'informed': 0.78; 'replies.': 0.84; 'working,': 0.84
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=FJdOQ8JdRmcC0bO3AxhptMcG7INY5PIK/8hG9ntciSM=; b=b787Y1HrP6aWGLnSFPQqLbV6JyzaAJiJJ/OJkboEW3G5e30+Bzb98DsbWpSk0ohxqW ROrcyiPGlR0UEEgCtlmlGIwAJL8UlbVw9VTOdjRkB98gPR87virPBD6v4a4X2j7JWbgZ 7POsaiASwGvLzbKh2GwxcurcVr6pChDVZQdjg9nSHMh18zl4vc39EhuQr3ftbxybEkJf q1bnxRuzpJVsDFRqwF+vkOR08eL1G7QGOmFHATAjqoLAVfPdnsAVRVdHh8FqHFxWznO6 p3k39JcZUA1r9ZKj/8QIkzRLNB7QLjJMOtmMwPmlmV+jH9Dkl7rpck8OzN3BoM7TZ70i zrmg==
MIME-Version 1.0
X-Received by 10.180.106.165 with SMTP id gv5mr436024wib.32.1390503744771; Thu, 23 Jan 2014 11:02:24 -0800 (PST)
In-Reply-To <CAPTjJmpOAbELy1+w-HvZAaBdsknvsyPsTnXBfkiULhQDaB3i3g@mail.gmail.com>
References <mailman.5853.1390438708.18130.python-list@python.org> <roy-7A7FAE.20082622012014@news.panix.com> <mailman.5855.1390439920.18130.python-list@python.org> <roy-1771A1.20270322012014@news.panix.com> <CACwCsY6Lq=x=XSc6Edqh+v0RH2Q-9t+2cgJ+xbsC+ADfsh90pA@mail.gmail.com> <CAPTjJmpOAbELy1+w-HvZAaBdsknvsyPsTnXBfkiULhQDaB3i3g@mail.gmail.com>
Date Thu, 23 Jan 2014 12:02:24 -0700
Subject Re: Case insensitive exists()?
From Larry Martell <larry.martell@gmail.com>
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5904.1390503746.18130.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1390503746 news.xs4all.nl 2871 [2001:888:2000:d::a6]:48614
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64628

Show key headers only | View raw


On Wed, Jan 22, 2014 at 9:29 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell <larry.martell@gmail.com> wrote:
>> I am writing something that is part of a django app, that based on
>> some web entry from the user, I run a query, get back a list of files
>> and have to go receive them and serve them up back to the browser. My
>> script is all done and seem to be working, then today I was informed
>> it was not serving up all the images. Debugging revealed that it was
>> this case issue - I was matching with exists(). As I've said, coding a
>> solution is easy, but I fear it will be too slow. Speed is important
>> in web apps - users have high expectations. Guess I'll just have to
>> try it and see.
>
> Would it be a problem to rename all the files? Then you could simply
> lower() the input name and it'll be correct.

So it turned out that in the django model definition for this object
there was code that was doing some character mapping that was causing
this. That code was added to 'fix' another problem, but the mapping
strings were not qualified enough and it was doing some unintended
mapping. Changing those strings to be more specific fixed my problem.

Thanks to all for the replies.

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


Thread

Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 17:58 -0700
  Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:08 -0500
    Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 18:18 -0700
      Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:27 -0500
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 21:24 -0700
        Re: Case insensitive exists()? Chris Angelico <rosuav@gmail.com> - 2014-01-23 15:29 +1100
        Re: Case insensitive exists()? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-01-23 15:43 +0000
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-23 12:02 -0700
      Re: Case insensitive exists()? Dan Sommers <dan@tombstonezero.net> - 2014-01-23 07:51 +0000
  Re: Case insensitive exists()? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-23 12:06 +0000
  Re: Case insensitive exists()? Grant Edwards <invalid@invalid.invalid> - 2014-01-23 14:58 +0000

csiph-web