Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #2720
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <drsalists@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'received:209.85.212.46': 0.03; 'received:mail-vw0-f46.google.com': 0.03; 'wed,': 0.04; 'modified': 0.05; 'think,': 0.05; '3.2': 0.07; 'ascii': 0.07; 'terry': 0.07; 'tue': 0.07; 'python': 0.07; '>>>>': 0.09; 'bytes,': 0.09; 'str': 0.09; 'api': 0.11; 'pm,': 0.11; 'this:': 0.11; 'slightly': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'subject:python': 0.15; '"copyright",': 0.16; '"credits"': 0.16; '"license"': 0.16; '9:31': 0.16; '[gcc': 0.16; 'earlier,': 0.16; 'linux2': 0.16; 'mrab': 0.16; 'reedy': 0.16; 'removal.': 0.16; 'type:': 0.16; '\xa0>>>': 0.16; '\xa0in': 0.16; 'traceback': 0.16; '(most': 0.16; 'bytes': 0.19; 'tue,': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'last):': 0.23; 'received:209.85.212': 0.25; 'suspect': 0.25; 'feb': 0.26; 'skip:b 20': 0.27; 'url:mailman': 0.27; 'fixed': 0.27; 'message- id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'thanks.': 0.28; 'string': 0.29; 'subject:?': 0.29; 'unicode': 0.29; 'cmd': 0.31; 'typeerror:': 0.31; "skip:' 10": 0.32; 'to:addr:python-list': 0.32; 'url:listinfo': 0.33; 'actually': 0.34; 'there': 0.35; 'file': 0.35; '"",': 0.35; 'function.': 0.35; 'problems': 0.37; 'some': 0.37; 'received:209.85': 0.37; 'url:python': 0.37; 'apr': 0.38; 'strings': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'no.': 0.38; 'url:org': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'header:Received:5': 0.40; 'split': 0.60; 'back': 0.61; '2011': 0.62; 'kept': 0.73; '(unicode)': 0.84; '10:04': 0.84; 'cc:addr:python': 0.84; 'subject:better': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jPkTbGBmivLkM+bxtvYWkrVmWICFmSaPT+Vq7ZO2JBg=; b=OAhnCbd6f8lF25iTPdVQ/drmhEUd1teb3ghLld4BBNy+dCD/XGLKtooljHHg+yK6vL ABNPNqD531kRE2faqmY7f6iu0Uw4LVflcbxZGEEeM3Yx41Xqacn5XW5JRmIZb2nuLeXa YwvTcOcaeLohWdh5sxIdiveoglotMcu592QcE= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VOeiUu+reGgqzVDNndPrS345Zyj6iO6kYJO2Ax4D2KtODmlXaIvBnPxdvUOuZjiAUb AqSVT0RvnUryFA1OvfNtgFgO0JoSTXJzYKR8rl8O5+lx5Q2nkF7scKvLA3ulFyRYyjtR hm3PJjcTa6rVr5MhASCexNQTHNmq6JoqNXJFw= |
| MIME-Version | 1.0 |
| In-Reply-To | <4D9C954C.4080401@mrabarnett.plus.com> |
| References | <mailman.42.1302007551.9059.python-list@python.org> <inf9vi$nvm$1@dont-email.me> <4d9b7eaa$0$10570$742ec2ed@news.sonic.net> <ings9q$qse$2@dough.gmane.org> <BANLkTi=waQzxrCfVhsnjB-Q5jnW7EJtpPA@mail.gmail.com> <4D9C954C.4080401@mrabarnett.plus.com> |
| Date | Wed, 6 Apr 2011 13:14:46 -0700 |
| Subject | Re: is python 3 better than python 2? |
| From | Dan Stromberg <drsalists@gmail.com> |
| 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.85.1302120891.9059.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1302120891 news.xs4all.nl 41113 [::ffff:82.94.164.166]:51561 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:2720 |
Show key headers only | View raw
On Wed, Apr 6, 2011 at 9:31 AM, MRAB <python@mrabarnett.plus.com> wrote:
> On 06/04/2011 07:06, Dan Stromberg wrote:
>>
>> On Tue, Apr 5, 2011 at 10:04 PM, Terry Reedy <tjreedy@udel.edu
>> <mailto:tjreedy@udel.edu>> wrote:
>>
>> On 4/5/2011 4:42 PM, John Nagle wrote:
>>
>> Well, actually Unicode support went in back around Python 2.4.
>>
>>
>> Even earlier, I think, but there were and still are problems with
>> unicode in 2.x. Some were and will only be fixed in 3.x.
>>
>>
>> In 3.x, ASCII strings went away, but that was more of a removal.
>>
>>
>> Yes and no. They were kept slightly modified as bytes, with all of
>> the string methods kept.
>>
>>
>> I suspect not all string methods were kept for the bytes type:
>> $ /usr/local/cpython-3.2/bin/python
>> cmd started 2011 Tue Apr 05 11:05:08 PM
>> Python 3.2 (r32:88445, Feb 20 2011, 16:47:11)
>> [GCC 4.4.5] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> 'a/b/c'.split('/')
>> ['a', 'b', 'c']
>> >>> b'a/b/c'.split('/')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> TypeError: Type str doesn't support the buffer API
>> >>>
>>
> You're trying to split bytes with a str (Unicode) argument. Try this:
>
>>>> b'a/b/c'.split(b'/')
> [b'a', b'b', b'c']
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Doh. Thanks. Now I can eliminate my my_split function. ^_^
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
is python 3 better than python 2? neil <neilharper300890@gmail.com> - 2011-04-05 13:42 +0100
Re: is python 3 better than python 2? Mel <mwilson@the-wire.com> - 2011-04-05 14:46 +0000
Re: is python 3 better than python 2? John Nagle <nagle@animats.com> - 2011-04-05 13:42 -0700
Re: is python 3 better than python 2? Terry Reedy <tjreedy@udel.edu> - 2011-04-06 01:04 -0400
Re: is python 3 better than python 2? MRAB <python@mrabarnett.plus.com> - 2011-04-06 17:31 +0100
Re: is python 3 better than python 2? Terry Reedy <tjreedy@udel.edu> - 2011-04-06 13:01 -0400
Re: is python 3 better than python 2? Dan Stromberg <drsalists@gmail.com> - 2011-04-06 13:14 -0700
Re: is python 3 better than python 2? Gnarlodious <gnarlodious@gmail.com> - 2011-04-05 09:50 -0700
csiph-web