Stefan Krah added the comment:

Well, I suppose one could use a cascaded switch statement, starting with the
7th letter and then (in the case of HALF*) proceed with the 12th letter:

"ROUND_CEILING"
"ROUND_FLOOR"
"ROUND_UP"
"ROUND_DOWN"
"ROUND_HALF_UP"
"ROUND_HALF_DOWN" 
"ROUND_HALF_EVEN"
"ROUND_05UP"

That should be as fast as PyLong_AsLong().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16422>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to