S
Steven D'Aprano
I should hope so ;-)
I blame my keyboard, where letters A and K are practically right next to
each other, only seven letters apart. An easy typo to make.
I should hope so ;-)
I blame my keyboard, where letters A and K are practically right
next to each other, only seven letters apart. An easy typo to make.
I blame my keyboard, where letters A and K are practically right next to
each other, only seven letters apart. An easy typo to make.
Chris Angelico said:“It’s an easy mistake to make†the PFY concurs “Many’s the time I’ve
picked up a cattle prod thinking it was a lint remover as I’ve helped
groom one of your predecessors before an important board meeting about
slashing the IT budget.â€
http://www.theregister.co.uk/2010/11/26/bofh_2010_episode_18/
ChrisA
What means "PFY"? The only thing I can think of is "Poor F---ing
Yankee"
The fi ligature was created because visually, an f and i wouldn't work
well together: the crossbar of the f was near, but not connected to the
serif of the i, and the terminal bulb of the f was close to, but not
coincident, with the dot of the i.
This article goes into great detail, and has a good illustration of how
an f and i can clash, and how an fi ligature can fix the problem:
http://opentype.info/blog/2012/11/20/whats-a-ligature/ . Note the second
fi illustration, which demonstrates using a ligature to make the letters
appear *less* connected than they would individually!
This is also why "simply spacing the characters" isn't a solution: a
specially designed ligature looks better than a separate f and i, no
matter how minutely kerned.
It's unfortunate that Unicode includes presentation alternatives like
the fi (and ff, fl, ffi, and fl) ligatures. It was done to be a
superset of existing encodings.
Many typefaces have other non-encoded ligatures as well, especially
display faces, which also have alternate glyphs. Unicode is a funny mix
in that it includes some forms of alternates, but can't include all of
them, so we have to put up with both an ad-hoc Unicode that includes
presentational variants, and also some other way to specify variants
because Unicode can't include all of them.
4(2) If you reverse that string, does it give "lëon"? The implication of
this question is that strings should operate on grapheme clusters rather
than code points. Python fails this test:
py> print("noe\u0308l"[::-1])
leonlëonprint(unicodedata.normalize('NFC', "noe\u0308l")[::-1])
(3) What are the first three characters? The author suggests that the
answer should be "noë", in which case Python fails again:
py> print("noe\u0308l"[:3])
noenoëprint(unicodedata.normalize('NFC', "noe\u0308l")[:3])
(4) Likewise, what is the length of the decomposed string? The author
expects 4, but Python gives 5:
py> len("noe\u0308l")
5
(2) If you reverse that string, does it give "lëon"? The implicationof
this question is that strings should operate on grapheme clusters rather
than code points. ...
0.11.13 02:44, Steven D'Aprano напиÑав(ла):
BTW, a grapheme cluster *is* a code points cluster.
I don't remember him ever having a valid point, so FTR can we have a
reference please. I do remember Steven D'Aprano showing that there was a
regression which I flagged up here http://bugs.python.org/issue16061. It
was fixed by Serhiy Storchaka, who appears to have forgotten more about
Python than I'll ever know, grrr!!!
something here. The consequences are nowhere near as dramatic as jmf claimsFrom your own bug report (quoting Steven): "Nevertheless, I think there is
I don't remember him [jmf] ever having a valid point, so FTR can we have a reference please. I do remember Steven D'Aprano
showing that there was a regression which I flagged up here http://bugs.python.org/issue16061. It was fixed by Serhiy
Storchaka, who appears to have forgotten more about Python than I'll ever know, grrr!!!
On 2 December 2013 09:06, Mark Lawrence <[email protected]
I don't remember him ever having a valid point, so FTR can we have a
reference please. I do remember Steven D'Aprano showing that there
was a regression which I flagged up here
http://bugs.python.org/__issue16061
<http://bugs.python.org/issue16061>. It was fixed by Serhiy
Storchaka, who appears to have forgotten more about Python than I'll
ever know, grrr!!!
From your own bug report (quoting Steven): "Nevertheless, I think there
is something here. The consequences are nowhere near as dramatic as jmf
claims ..."
His initial postings did lead to a regression being found.
Tim Delaney
(2) If you reverse that string, does it give "lëon"? The implication ofthis question is that strings should operate on grapheme clusters ratherthan code points. ...
BTW, a grapheme cluster *is* a code points cluster.
Anyone with a decent level of reading comprehension would have understoodthat Steven knows that. The implied word is "individual" i.e. "... rather than [individual] code points".
Why am I responding to a troll? Probably because out of all his baseless complaints about the FSR, he *did* have one valid point about performance that has now been fixed.
Tim Delaney
1) Your English is far from perfect as you clearly do not understand the
repeated requests *NOT* to send us double spaced crap via google groups.
2) You can't speak about the FSR as you know precisely nothing about it,
but as they say, ignorance is bliss.
He's quite deliberately dragged it up by using p.s. Without doubt he's the
worst loser in the world and I'm *NOT* stopping getting at him. I find his
behaviour, continuously and groundlessly insulting the Python core
developers, quite disgusting.
He's quite deliberately dragged it up by using p.s. Without doubt he's
the worst loser in the world and I'm *NOT* stopping getting at him. I
find his behaviour, continuously and groundlessly insulting the Python
core developers, quite disgusting.
the worst loser in the world
Out of the nine tests, Python 3.3 passes six, with three tests being
failures or dubious. If you believe that the native string type should
operate on code-points, then you'll think that Python does the right
thing.
Mark, I consider your continual direct personal attacks on other posters
to be a violation of the PSF Code of Conduct, which *does* apply to
python-list. Please stop.
I think Python is doing it correctly. If I want to operate on
"clusters" I'll normalize the string first.
Thanks for this excellent post.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.