Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'json': 0.05; 'subject:number': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:both': 0.09; 'python': 0.10; 'output': 0.13; 'file,': 0.15; '12:38,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:)?': 0.16; 'yaml': 0.16; 'wrote:': 0.16; 'input': 0.18; 'language': 0.19; '>>>': 0.20; 'lawrence': 0.22; 'parse': 0.22; 'parsing': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'switch': 0.27; "i'm": 0.30; 'language.': 0.32; 'instead,': 0.33; 'values.': 0.33; 'so,': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'starting': 0.37; 'to:addr:python.org': 0.40; 'mark': 0.40; 'skip:u 10': 0.61; 'charset:windows-1252': 0.62; 'our': 0.64; '"can': 0.84; 'pythonistas,': 0.84; 'subject:Casting': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Casting to a "number" (both int and float)? Date: Sun, 30 Aug 2015 13:55:50 +0100 References: <0bdda01a-de29-4742-9851-0617dad602ae@googlegroups.com> <661c74bf-d038-41be-9519-2260f24ab8e2@googlegroups.com> <55E2EB23.1010405@mail.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 195.147.65.191 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <55E2EB23.1010405@mail.de> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440939368 news.xs4all.nl 23726 [2001:888:2000:d::a6]:57589 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95766 ".esnes sekam ti wonk uoY .daer ot ysae os sgniht ekam seod yllaer ti ,niaga gnitsop potrof s'knahT" On 30/08/2015 12:38, Sven R. Kunze wrote: > Well, it comes down to "can he switch from JSON to YAML" in the first > place as he is going to parse "by-third-party" generated json. So, if he > can persuade MongoDB to output YAML instead, he would be all fine. > > Just my 2 cents. > > On 28.08.2015 18:15, Robin Koch wrote: >> Am 28.08.2015 um 18:09 schrieb Sven R. Kunze: >> >> >> I'm reading JSON output from an input file, and extracting values. >> > >>> for proper parsing into native Python types, I would recommend YAML. >> >> "What's the best way to get from A to B?" >> "I recommend starting at C." >> >> - Every other usenet-discussion. >> > -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence