HCT added the comment: > I think slicing semantically "seems wrong" but it might be more elegant. It > might also make catching errors harder (in the case where an int is sent to a > function that does slicing and now won't fail with a TypeError).
not sure what's semantically "seems wrong" with it. not sure why TypeError or any other error catching should come into play for this. calling a function is way more expensive than doing bit shift and/or AND operation. as a function, you've only hide your code into Python binaries at the expense of performance ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19915> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com