Saiyang Gou <gousaiyang...@gmail.com> added the comment:

In addition to the consistency with existing audit hook signatures, there may 
also be another benefit of wrapping it with a tuple of length 1. If 
gc.get_referrers or gc.get_referents happens to gain a new keyword-only 
argument in the future, we may need to add the new argument to the hook args. 
Extending the `(objs,)` tuple to `(objs, new_kwarg)` is a bit more elegant than 
appending the `new_kwarg` to the end of the `objs` tuple itself (considering a 
hook function which tries to be compatible with both the old and the new 
signature).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43439>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to