This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients mark.dickinson, skrah, yselivanov
Date 2012-11-07.20:14:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20121107201434.GA24691@sleipnir.bytereef.org>
In-reply-to <1352280971.72.0.0694367226643.issue16422@psf.upfronthosting.co.za>
Content
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().
History
Date User Action Args
2012-11-07 20:14:34skrahsetrecipients: + skrah, mark.dickinson, yselivanov
2012-11-07 20:14:33skrahlinkissue16422 messages
2012-11-07 20:14:33skrahcreate