Gregory P. Smith <g...@krypto.org> added the comment:
An example code snippet to detect if the API supports the new parameter at runtime for code that wants to use to use something other than the default '&'. ``` if 'separator' in inspect.signature(urllib.parse.parse_qs).parameters: ... parse_qs(..., separator=';') else: ... parse_qs(...) ``` calling it with the arg and catching TypeError if that fails would also work, but might not be preferred as catching things like TypeError is non-specific and could hide other problems, making it a code maintenance headache. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42967> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com