2014-08-15 7:50 GMT+02:00 Nick Coghlan <ncogh...@gmail.com>: > As far as I am aware, that last item poses the only open question, > with the alternative being to add an "iterbytes" builtin (...)
Do you have examples of use cases for a builtin function? I only found 5 usages of bytes((byte,)) constructor in the standard library: $ grep -E 'bytes\(\([^)]+, *\)\)' $(find -name "*.py") ./Lib/quopri.py: c = bytes((c,)) ./Lib/quopri.py: c = bytes((c,)) ./Lib/base64.py: b32tab = [bytes((i,)) for i in _b32alphabet] ./Lib/base64.py: _a85chars = [bytes((i,)) for i in range(33, 118)] ./Lib/base64.py: _b85chars = [bytes((i,)) for i in _b85alphabet] bytes.iterbytes() can be used in 4 cases on 5. Adding a new builtin for a single line in the whole standard library doesn't look right. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com