Skip to content

Commit

Permalink
docs/stdlib/data: improved wording describing example that is shape-like
Browse files Browse the repository at this point in the history
The RGBLayout class itself is not shapelike, only instances of this class
are shape-like. (i.e. `Shape.cast(RGBLayout)` would fail)
It's worth being precise especially because in some cases the classes
themselves are shape-like, for example in the case of Enums, the classes
that inherit from Enum are shape-like.
  • Loading branch information
purdeaandrei authored and whitequark committed Aug 3, 2024
1 parent 69faf77 commit dd1d8d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/stdlib/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ In case the data has related operations or transformations, :class:`View` can be
def brightness(self):
return (self.red + self.green + self.blue)[-8:]

Here, the :py:`RGBLayout` class itself is :ref:`shape-like <lang-shapelike>` and can be used anywhere a shape is accepted. When a :class:`Signal` is constructed with this layout, the returned value is wrapped in an :py:`RGBView`:
Here, an instance of the :py:`RGBLayout` class itself is :ref:`shape-like <lang-shapelike>` and can be used anywhere a shape is accepted. When a :class:`Signal` is constructed with this layout, the returned value is wrapped in an :py:`RGBView`:

.. doctest::

Expand Down

0 comments on commit dd1d8d5

Please sign in to comment.