Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'string.': 0.05; 'binary': 0.07; 'interpreter.': 0.07; 'string': 0.09; 'subject:few': 0.09; 'python': 0.11; 'creates': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'number?': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'header:In-Reply- To:1': 0.27; 'point': 0.28; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; '13,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'received:google.com': 0.35; 'doing': 0.36; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'flat': 0.60; 'simple': 0.61; 'fact,': 0.69; 'receive': 0.70; '10:11': 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:content-transfer-encoding; bh=Zs3/DWr8dV2VmVFOaq8nPoBnYmuwANyL94O9avE/0qE=; b=BP2SGTTFb2oDpaG1l/fi/kfVePVQM3UTLECShYvJ3UykHxpZbdwnFT2+ISUYpzxF79 O3BGAbe3aRNuwz0r5ZKuke6AoU/GF6R9S3r+cCHSsJRxLXIcgwNT9BvmFziEIg94Dopz yhCjF0R7KVdpyFvX3K7ytOE/6hXTnum0qE6Ik7ziNJzbPuek1Y0FQ9ti/1czC2eRZJsg bH+Jn5AxZKC+tb0IdTRmRYzEHeaMsClcs4gNovqN/Wwi18SrX3AkumjXe5kvzcf7WWW4 aWEJxVr0BD3/SoJYPCLqaMvv+6RqPxsLFcrzDa++2iJfO5HckCsNNM4pNG1SGpSlhmsv u3Lg== MIME-Version: 1.0 X-Received: by 10.220.167.69 with SMTP id p5mr187754vcy.57.1371110285047; Thu, 13 Jun 2013 00:58:05 -0700 (PDT) In-Reply-To: References: <6dfa3707-80f4-407a-a109-66dbb0130513@googlegroups.com> <51b83e5a$0$29998$c3e8da3$5496439d@news.astraweb.com> <51b90ead$0$29997$c3e8da3$5496439d@news.astraweb.com> <51b9708b$0$29872$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 13 Jun 2013 17:58:04 +1000 Subject: Re: A few questiosn about encoding From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371110288 news.xs4all.nl 15917 [2001:888:2000:d::a6]:39837 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47919 On Thu, Jun 13, 2013 at 5:42 PM, =CD=E9=EA=FC=EB=E1=EF=F2 =CA=EF=FD=F1=E1= =F2 wrote: > On 13/6/2013 10:11 =F0=EC, Steven D'Aprano wrote: >> No! That creates a string from 16474 in base two: >> '0b100000001011010' > > I disagree here. > 16474 is a number in base 10. Doing bin(16474) we get the binary > representation of number 16474 and not a string. > Why you say we receive a string while python presents a binary number? You can disagree all you like. Steven cited a simple point of fact, one which can be verified in any Python interpreter. Nikos, you are flat wrong here; bin(16474) creates a string. ChrisA