PEP 399: Resolve uses of the default role (#3390)
This commit is contained in:
parent
72cafd1859
commit
3bc3ad8f39
|
@ -161,9 +161,9 @@ could be added.
|
|||
To also help with compatibility, C code should use abstract APIs on
|
||||
objects to prevent accidental dependence on specific types. For
|
||||
instance, if a function accepts a sequence then the C code should
|
||||
default to using `PyObject_GetItem()` instead of something like
|
||||
`PyList_GetItem()`. C code is allowed to have a fast path if the
|
||||
proper `PyList_CheckExact()` is used, but otherwise APIs should work
|
||||
default to using ``PyObject_GetItem()`` instead of something like
|
||||
``PyList_GetItem()``. C code is allowed to have a fast path if the
|
||||
proper ``PyList_CheckExact()`` is used, but otherwise APIs should work
|
||||
with any object that duck types to the proper interface instead of a
|
||||
specific type.
|
||||
|
||||
|
|
Loading…
Reference in New Issue