Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63370
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; 'method.': 0.07; 'bytes.': 0.09; 'indeed,': 0.09; 'cc:addr:python- list': 0.11; 'jan': 0.12; ':-(': 0.16; 'dump': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hex': 0.16; 'subject:More': 0.16; 'subject:Unicode': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; '>>>': 0.22; 'putting': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; '2.x': 0.24; 'byte': 0.24; 'bytes': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'tim': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'easier': 0.31; '>>>>': 0.31; 'chase': 0.31; 'subject:About': 0.31; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'turn': 0.37; 'little': 0.38; 'space': 0.40; 'subject:"': 0.60; 'new': 0.61; 'such': 0.63; 'between': 0.67; 'to:none': 0.92 |
| 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:cc :content-type; bh=sZcxcbYbmlOdI3DZy/Uh89OZDMzQWxUwxB2sVbu4XBs=; b=nzYSqwroP2AL7ZcGcifh7CgIfxtlQeNVXHnvPCf4Vq1IID7E1gbE2KHjw7bUkms9EK gee5aJh0PWGofOYV2nqf7XCrkJ+/2chPQ0guN/8BLDEmwpAEWaoxB7TsxhWq+vNygVB+ XKlRtgVF/al6nzm79eberDN4mummQPjhiRiVCdqJyNpQGjYI8p50De9+QQF+Gqy6HwP6 LI2TXf/DlsAX/5wFyUJ1lB2hfAFt1o8hSWuDXHKf/IQhM5MBFvdN7koVyn7oa0i1sYy0 NM41LMPljnXWpNFmurYr0/w4KptUZ90QQ2lg3Zx9DTiyFPTLGC4YvyQugyG5NcRGWzvC LSDA== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.162.66 with SMTP id xy2mr10592813pbb.46.1389049561853; Mon, 06 Jan 2014 15:06:01 -0800 (PST) |
| In-Reply-To | <20140106144218.225787b3@bigbox.christie.dr> |
| References | <lablra$1mc$2@ger.gmane.org> <labmaj$8u2$1@ger.gmane.org> <lad05k$gf6$1@ger.gmane.org> <CAPTjJmqBeoTLxXiKVcsvk395qgKt+Qv+jF_sOpzi7CgZmBjQcw@mail.gmail.com> <52CA13BD.4050708@stoneleaf.us> <mailman.5001.1388976943.18130.python-list@python.org> <roy-7ED5DF.23241105012014@news.panix.com> <CAPTjJmqNZyuvVvBu1zD7Ht7YySZ9weDLiOdL=6TNKHhfsqqH7g@mail.gmail.com> <laf35j$96i$1@ger.gmane.org> <20140106144218.225787b3@bigbox.christie.dr> |
| Date | Tue, 7 Jan 2014 10:06:01 +1100 |
| Subject | Re: "More About Unicode in Python 2 and 3" |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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 | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5088.1389049571.18130.python-list@python.org> (permalink) |
| Lines | 18 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1389049571 news.xs4all.nl 2965 [2001:888:2000:d::a6]:32978 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:63370 |
Show key headers only | View raw
On Tue, Jan 7, 2014 at 7:42 AM, Tim Chase <python.list@tim.thechases.com> wrote:
> On 2014-01-06 22:20, Serhiy Storchaka wrote:
>> >>>> data = b"\x43\x6c\x67\x75\x62\x61" # is there an easier way to
>> >>>> turn a hex dump into a bytes literal?
>>
>> >>> bytes.fromhex('43 6c 67 75 62 61')
>> b'Clguba'
>
> Very nice new functionality in Py3k, but 2.x doesn't seem to have such
> a method. :-(
Thanks, Serhiy. Very nice new functionality indeed, and not having it
in 2.x isn't a problem to me. That's exactly what I was looking for -
it doesn't insist on (or complain about) separators between bytes.
(Though the error from putting a space _inside_ a byte is a little
confusing. But that's trivial.)
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-06 13:55 +1100
Re: "More About Unicode in Python 2 and 3" Roy Smith <roy@panix.com> - 2014-01-05 23:24 -0500
Re: "More About Unicode in Python 2 and 3" Tim Chase <python.list@tim.thechases.com> - 2014-01-05 22:41 -0600
Re: "More About Unicode in Python 2 and 3" Roy Smith <roy@panix.com> - 2014-01-05 23:49 -0500
Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-06 15:59 +1100
Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-06 15:51 +1100
Re: "More About Unicode in Python 2 and 3" Tim Chase <python.list@tim.thechases.com> - 2014-01-06 05:49 -0600
Re: "More About Unicode in Python 2 and 3" Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-07 03:24 +1100
Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-07 03:30 +1100
Re: "More About Unicode in Python 2 and 3" Serhiy Storchaka <storchaka@gmail.com> - 2014-01-06 22:20 +0200
Re: "More About Unicode in Python 2 and 3" Serhiy Storchaka <storchaka@gmail.com> - 2014-01-06 22:21 +0200
Re: "More About Unicode in Python 2 and 3" Tim Chase <python.list@tim.thechases.com> - 2014-01-06 14:42 -0600
Re: "More About Unicode in Python 2 and 3" Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-06 20:47 +0000
Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-07 10:06 +1100
csiph-web