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


Groups > comp.lang.python > #45834

Re: Accessing Json data (I think I am nearly there) complete beginner

Path csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'cpython': 0.05; 'nasty': 0.07; 'tool,': 0.07; 'lawrence': 0.09; 'mess': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows': 0.15; '23,': 0.16; 'json,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Accessing': 0.16; 'subject:beginner': 0.16; 'usernames': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'url:moin': 0.24; 'world,': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; 'subject:) ': 0.29; "doesn't": 0.30; 'andrew': 0.30; 'direction': 0.30; 'heading': 0.30; 'especially': 0.30; 'code': 0.31; 'url:wiki': 0.31; 'url:python': 0.33; 'subject: (': 0.35; 'but': 0.35; 'there': 0.35; 'done,': 0.36; 'otherwise.': 0.36; 'subject:data': 0.36; 'useful': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'guy': 0.60; "you're": 0.61; 'first': 0.61; 'real': 0.63; 'charset:windows-1252': 0.65; 'worth': 0.66; 'managing': 0.66; 'reply': 0.66; 'believe': 0.68; 'benefit': 0.68; 'yes': 0.68; 'subject:there': 0.68; 'funny': 0.74; '9.1': 0.84; 'freebsd': 0.84; 'subject:think': 0.84; 'received:89': 0.85; 'inefficient': 0.91; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Accessing Json data (I think I am nearly there) complete beginner
Date Thu, 23 May 2013 19:56:19 +0100
References <509030d9-08fd-40b2-8a89-cd4ecfad7a1a@googlegroups.com> <mailman.2022.1369327254.3114.python-list@python.org> <b7d6a9ac-4bff-45be-9db9-89d860796872@googlegroups.com> <mailman.2026.1369332693.3114.python-list@python.org> <c9d46774-64c9-40f0-8589-6d261382ee5a@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host host-89-240-174-199.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
In-Reply-To <c9d46774-64c9-40f0-8589-6d261382ee5a@googlegroups.com>
X-Antivirus avast! (VPS 130523-0, 23/05/2013), Outbound message
X-Antivirus-Status Clean
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.2030.1369335379.3114.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369335379 news.xs4all.nl 15955 [2001:888:2000:d::a6]:48630
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45834

Show key headers only | View raw


On 23/05/2013 19:19, Andrew Edwards-Adams wrote:
> On Thursday, May 23, 2013 7:11:28 PM UTC+1, Andrew Berg wrote:
>> On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
>>
>>> Hi thanks for the reply Andrew, my first bit of code was heading in the right direction I was managing to pull out the usernames from the JSON, using REGEX.
>>
>> It's also worth mentioning that regexes are almost always the wrong tool, especially for standardized formats like JSON. They can be very
>>
>> useful when nothing saner will get the job done, but are a nasty mess with no real benefit otherwise.
>>
>> --
>>
>> CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
>
> Thanks Andrew, yes I believe this is what the guy who provided me with the code was thinking. I was about to embark on what was definitely going to be an inefficient long regex.
>

Funny old world, there doesn't appear to be working code but someone is 
already thinking about definite inefficiency.  What evidence do you have 
to support this claim?

-- 
If you're using GoogleCrap™ please read this 
http://wiki.python.org/moin/GoogleGroupsPython.

Mark Lawrence

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


Thread

Accessing Json data (I think I am nearly there) complete beginner Andrew Edwards-Adams <aeaprog@gmail.com> - 2013-05-23 09:09 -0700
  Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-23 11:40 -0500
    Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Edwards-Adams <aeaprog@gmail.com> - 2013-05-23 09:58 -0700
      Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-23 12:59 -0500
      Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-23 13:11 -0500
        Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Edwards-Adams <aeaprog@gmail.com> - 2013-05-23 11:19 -0700
          Re: Accessing Json data (I think I am nearly there) complete beginner Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-23 19:56 +0100
            Re: Accessing Json data (I think I am nearly there) complete beginner Andrew Edwards-Adams <aeaprog@gmail.com> - 2013-05-23 14:30 -0700
  Re: Accessing Json data (I think I am nearly there) complete beginner MRAB <python@mrabarnett.plus.com> - 2013-05-23 17:53 +0100

csiph-web