[Python-ideas] Python 3.x and bytes

Stephen J. Turnbull stephen at xemacs.org
Tue May 24 14:47:07 CEST 2011


Nick Coghlan writes:

 > Still, I've come around to the point of view that the simplest and
 > clearest way to write it is simply "ord('x')", and if that is in a
 > time-critical inner loop, save the value in a named variable.

+1.  Actually, I prefer the latter.  I feel that the former is just a
complicated and expensive magic number in almost all cases.




More information about the Python-ideas mailing list