Python 3 regex?

wxjmfauth at gmail.com wxjmfauth at gmail.com
Thu Jan 15 02:03:57 EST 2015


Le jeudi 15 janvier 2015 01:33:37 UTC+1, Steven D'Aprano a écrit :
> Thomas 'PointedEars' Lahn wrote:
> 
> > wxjmfauth at gmail.com wrote:
> [...]
> >> And, why not? compare Py3.2 and Py3.3+ !
> > 
> > What are you getting at?
> 
> 
> Don't waste your time with JMF. He is obsessed with a trivial performance
> regression in Python 3.3. Unicode strings can be slightly more expensive to
> create in Python 3.3 compared to earlier versions, due to a clever memory
> optimization which saves up to 50% if your strings are all in the Basic
> Multilingual Plane and up to 75% if they are all in Latin-1. Never mind
> that for real-world code, that memory saving can often lead to applications
> running faster, JMF is obsessed with an artificial benchmark of his own
> devising that involves making, and throwing away, thousands of Unicode
> strings as fast as possible in such a way as to exercise the worst-case of
> the new Unicode model. From this unimportant performance regression, he has
> convinced himself that this means that Python 3.3 and beyond is logically
> and mathematically in violation of the Unicode standard.
> 
> Any time JMF mentions anything to do with Python versions or Unicode or
> ASCII or French, he is in full-blown "pi equals 3 exactly" crank territory
> and is best ignored.
> 
> 

It is not only a question of performance [*].
This kind of work is an *illustration" of a bad
design.
Unicode implementation in Python 3 is a shame,
and this brave devs are pretending to write a
serious tool? Let's be a little be serious.

What can I do against a guy who has already
invented the automatic coercion between ASCII
and Unicode. Nothing! Python3 is working in the
same spirit.

[*] on top of this, it is expectedly buggy.

For your information, I also wrote a (completely
dirty) unicode plain text editor, based on the
same widget used in TeXWorks. And I can tell
you, I'm not blind. It works very well with
Python 32  (it covers the whole unicode range).

Rembember: use a sheet of paper and a pencil
and a little bit less an editor.

jmf




More information about the Python-list mailing list