[issue27506] make bytes/bytearray delete a keyword argument

Xiang Zhang report at bugs.python.org
Wed Jul 13 11:38:38 EDT 2016


Xiang Zhang added the comment:

Please review the new version. It makes two changes comparing with the last one.

1. It exposes Python parameter as "delete" (which the document always uses so I think it's the API) while still use "deletechars" (which I prefer as a C variable name) in C code.

2. It allows *delete* to be None. Before this is not allowed but I don't think this change breaks backwards compatibility. The reason for this change is that I don't want users to get surprised when they pass the default value to translate but then get an exception.

----------
Added file: http://bugs.python.org/file43705/bytes_translate_delete_as_keyword_arguments_v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27506>
_______________________________________


More information about the Python-bugs-list mailing list