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


Groups > comp.lang.python > #5612

Re: Python 3.x and bytes

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.04; 'pep': 0.07; 'pm,': 0.11; 'wrote:': 0.14; 'immutable': 0.16; 'richardson': 0.16; 'bytes': 0.19; "he's": 0.19; 'tue,': 0.20; 'help.': 0.22; 'header:In-Reply-To:1': 0.22; 'received:209.85.161.46': 0.26; 'received:mail- fx0-f46.google.com': 0.26; 'message-id:@mail.gmail.com': 0.28; 'looks': 0.28; 'received:209.85.161': 0.29; '17,': 0.31; 'nope,': 0.31; 'to:addr:python-list': 0.32; 'using': 0.34; 'received:209.85': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'listed': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'form,': 0.40; 'header:Received:5': 0.40; '8bit%:4': 0.60; '2011': 0.62
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=aWadudNG5+31I1/pFn+yDomMklFD/mPy7GpJ3UI9cwI=; b=OGkwKEBvgL5XwJwtYa4oFUnrxD0V+Z1RpwenY4RGkMNqaDs1GHNPuhoe+8gZ2yVfIg sLoLhFMJz8T0Aa/fwgRT6PRqF5IfpgkEZTOgescdm+JJnC8wLGilr+XT0lCJMYcvz03z tFqi5rW9aDDg6ZWXIFs2QXYp+7BNRLVttSk0g=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Kby9f2c5+lCCvV+JQI8XZnzblbNE2+RGq39MsyssjuTLeYSXydtVVKGNidQhZ7W/Ll kDcbt0DHqucD5RFcEplWKL8rTp2uvu2KD4SL6pQBNEzTd2+rdqAisP/MmFzl6JfO+Jha S8mXZUwUTxr7eCADqPuoSM1FnpI0T5+e9B8zU=
MIME-Version 1.0
In-Reply-To <4DD2D175.30506@aim.com>
References <4DD2C2A5.3080403@stoneleaf.us> <4DD2D175.30506@aim.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 17 May 2011 14:51:31 -0600
Subject Re: Python 3.x and bytes
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.1713.1305665522.9059.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 82.94.164.166
X-Trace 1305665523 news.xs4all.nl 49046 [::ffff:82.94.164.166]:39277
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5612

Show key headers only | View raw


On Tue, May 17, 2011 at 1:50 PM, Corey Richardson <kb1pkl@aim.com> wrote:
> - From help(bytes):
>  |  bytes(iterable_of_ints) -> bytes
>  |  bytes(string, encoding[, errors]) -> bytes
>  |  bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
>  |  bytes(memory_view) -> bytes
>
> Looks like you're using the fourth when you want the first, possibly?

Nope, he's using the fifth form, bytes(int), which is listed in the
PEP but not in the help.

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


Thread

Re: Python 3.x and bytes Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-17 14:51 -0600

csiph-web