FSR and unicode compliance - was Re: RE Module Performance

wxjmfauth at gmail.com wxjmfauth at gmail.com
Mon Jul 29 07:43:46 EDT 2013


Le dimanche 28 juillet 2013 22:52:16 UTC+2, Steven D'Aprano a écrit :
> On Sun, 28 Jul 2013 12:23:04 -0700, wxjmfauth wrote:
> 
> 
> 
> > Do not forget that à la "FSR" mechanism for a non-ascii user is
> 
> > *irrelevant*.
> 
> 
> 
> You have been told repeatedly, Python's internals are *full* of ASCII-
> 
> only strings.
> 
> 
> 
> py> dir(list)
> 
> ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', 
> 
> '__dir__', '__doc__', '__eq__', '__format__', '__ge__', 
> 
> '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', 
> 
> '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', 
> 
> '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', 
> 
> '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', 
> 
> '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 
> 
> 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
> 
> 
> 
> There's 45 ASCII-only strings right there, in only one built-in type, out 
> 
> of dozens. There are dozens, hundreds of ASCII-only strings in Python: 
> 
> builtin functions and classes, attributes, exceptions, internal 
> 
> attributes, variable names, and so on.
> 
> 
> 
> You already know this, and yet you persist in repeating nonsense.
> 
> 
> 
> 
> 
> -- 
> 
> Steven

3.2
>>> timeit.timeit("r = dir(list)")
22.300465007102908

3.3
>>> timeit.timeit("r = dir(list)")
27.13981129541519

For the record, I do not put your example to contradict
you. I was expecting such a result even before testing.

Now, if you do not understand why, you do not understand.
There nothing wrong.

jmf




More information about the Python-list mailing list