On Sat, Apr 27, 2019 at 7:46 PM Stephan Hoyer <sho...@gmail.com> wrote:
> Worst, "__wrapped__" would be difficult to search for, because it already 
> means something in Python (referring to functools.wrapped). At least 
> "__numpy_implementation__" and "__skipping_array_function__" are both unique 
> tokens without any existing meaning.

It's not just functools.wrapped – there's definitely other code out
there that reads/writes __wrapped__ attributes on arbitrary callables
and tries to do something clever with it. Debian apparently has 182
packages that contain the token __wrapped__ in their source code [1].
There's a real risk that some of this code will think it knows what to
do with numpy's __wrapped__ and be wrong, or that new code that's
trying to skip __array_function__ dispatch will accidentally call
someone else's __wrapped__ without realizing.

-n

[1] https://codesearch.debian.net/search?q=__wrapped__&perpkg=1

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to