Where can the __bytes__ method be found?

Viewed 4529

The official documentation says:

object.__bytes__(self)

Called by bytes to compute a byte-string representation of an object. This should return a bytes object.

But when I do dir(object) or dir(bytes) or dir(bytearray), the __bytes__ method does not show up. So where can it be found?

1 Answers
Related