Skip to content

Commit b377505

Browse files
address comments
1 parent db8186b commit b377505

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cuda_bindings/docs/source/tips_and_tricks.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There is an important distinction between the ``getPtr()`` method and the behavi
1212
Getting and setting attributes of extension types
1313
=================================================
1414

15-
While the bindings outwardly presents the attributes of extension types in a Pythonic way, they can't always be interacted with in a Pythonic style. Often the getters/setters (__getitem__(), __setitem__()) are actually a translation step to convert values between Python and C. For example, in some cases, attempting to modify an attribute in place, will lead to unexpected behavior due to the design of the underlying implementation. For this reason, users should use the getters and setters directly when interacting with extension types.
15+
While the bindings outwardly present the attributes of extension types in a pythonic way, they can't always be interacted with in a Pythonic style. Often the getters/setters (__getitem__(), __setitem__()) are actually a translation step to convert values between Python and C. For example, in some cases, attempting to modify an attribute in place, will lead to unexpected behavior due to the design of the underlying implementation. For this reason, users should use the getters and setters directly when interacting with extension types.
1616

1717
An example of this is the :class:`~cuda.bindings.driver.CULaunchConfig` type.
1818

@@ -25,9 +25,9 @@ An example of this is the :class:`~cuda.bindings.driver.CULaunchConfig` type.
2525
2626
...
2727
28-
# This works. We are passing the attribute to the setter
28+
# This works. We are passing the new attribute to the setter
2929
drv_cfg.attrs = [attr]
3030
31-
# This does not work. We are trying to modify the attribute in place
31+
# This does not work. We are only modifying the returned attribute in place
3232
drv_cfg.attrs.append(attr)
3333

0 commit comments

Comments
 (0)