Skip to content

Commit 88a9a13

Browse files
committed
Added note about __bytes__ to Sound docs
1 parent b000246 commit 88a9a13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/reST/ref/mixer.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ The following file formats are supported
369369
an exception when different. Also, source samples are truncated to fit the
370370
audio sample size. This will not change.
371371

372+
.. note:: ``bytes(Sound)`` and ``bytearray(Sound)`` make use of the buffer
373+
interface, which is implemented internally by ``pygame.mixer.Sound``.
374+
Because of this, there is no need to directly implement ``__bytes__``.
375+
372376
.. versionaddedold:: 1.8 ``pygame.mixer.Sound(buffer)``
373377
.. versionaddedold:: 1.9.2
374378
:class:`pygame.mixer.Sound` keyword arguments and array interface support

0 commit comments

Comments
 (0)