Re: computing with characters
- From: Torsten Bronger <bronger@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 13:12:05 +0200
Hallöchen!
Duncan Booth writes:
Torsten Bronger <bronger@xxxxxxxxxxxxxxxxxxxxx> wrote:
The biggest ugliness though is ",".join(). No idea why this should
be better than join(list, separator=" "). Besides, ",".join(u"x")
yields an unicode object. This is confusing (but will probably go
away with Python 3).
It is only ugly because you aren't used to seeing method calls on
string literals.
I am used to it. Programming very much with unicode, I use .encode
and .decode very often and I like them. I consider en/decoding to
be an intrinsic feature of strings, but not ord(), which is an
"external", rather administrative operation on strings (and actually
not even this, but on characters) for my taste.
However, join() is really bizarre. The list rather than the
separator should be the leading actor.
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: bronger@xxxxxxxxxx
(See http://ime.webhop.org for further contact info.)
.
- Follow-Ups:
- Re: computing with characters
- From: Diez B. Roggisch
- Re: computing with characters
- From: Duncan Booth
- Re: computing with characters
- From: Marc 'BlackJack' Rintsch
- Re: computing with characters
- From: Marco Mariani
- Re: computing with characters
- References:
- computing with characters
- From: SL
- Re: computing with characters
- From: Lutz Horn
- Re: computing with characters
- From: SL
- Re: computing with characters
- From: Gabriel Genellina
- Re: computing with characters
- From: SL
- Re: computing with characters
- From: Torsten Bronger
- Re: computing with characters
- From: Duncan Booth
- computing with characters
- Prev by Date: Essentio CS5110 the first produced desktop from asus
- Next by Date: Re: computing with characters
- Previous by thread: Re: computing with characters
- Next by thread: Re: computing with characters
- Index(es):
Relevant Pages
|