Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46116
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'skip:p 40': 0.19; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'skip:p 30': 0.29; 'url:bugs': 0.29; 'am,': 0.29; 'url:python': 0.33; 'subject:from': 0.34; 'url:org': 0.36; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'received:fios.verizon.net': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Terry Jan Reedy <tjreedy@udel.edu> |
| Subject | Re: Output from to_bytes |
| Date | Sun, 26 May 2013 16:45:50 -0400 |
| References | <knstkh$74a$1@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | pool-173-75-251-66.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
| In-Reply-To | <knstkh$74a$1@news.albasani.net> |
| 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.2198.1369601157.3114.python-list@python.org> (permalink) |
| Lines | 17 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369601157 news.xs4all.nl 15955 [2001:888:2000:d::a6]:32921 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46116 |
Show key headers only | View raw
On 5/26/2013 8:02 AM, Mok-Kong Shen wrote:
> for k in range(8,12,1):
> print(k.to_bytes(2,byteorder='big'))
http://bugs.python.org/issue9951
http://bugs.python.org/issue3532
import binascii as ba
for k in range(8,12,1):
print(ba.hexlify(k.to_bytes(2,byteorder='big')))
>>>
b'0008'
b'0009'
b'000a'
b'000b'
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Output from to_bytes Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-05-26 14:02 +0200
Re: Output from to_bytes Chris Angelico <rosuav@gmail.com> - 2013-05-26 23:26 +1000
Re: Output from to_bytes Terry Jan Reedy <tjreedy@udel.edu> - 2013-05-26 16:45 -0400
Re: Output from to_bytes Grant Edwards <invalid@invalid.invalid> - 2013-05-28 15:35 +0000
Re: Output from to_bytes Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-06-02 21:09 +0200
Re: Output from to_bytes Ned Batchelder <ned@nedbatchelder.com> - 2013-06-02 18:18 -0400
csiph-web