Skip to content

docs/library/socket: Document socket.write(buf, offset, max_len). - #19739

Open
Josverl wants to merge 1 commit into
micropython:masterfrom
Josverl:docs/socket_write
Open

Josverl wants to merge 1 commit into
micropython:masterfrom
Josverl:docs/socket_write

Conversation

@Josverl

@Josverl Josverl commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

I found some un(der)documented overloads of socket.socket.write() while improving and testing the stubs.
These should be added to the documentation, especially as they as MicroPython specific extensions.

Testing

Both undocumented forms are already part of the test suite:

buf.write(b"foobar", 1, 3)
print(buf.getvalue())

buf.write(b"foobar", 1, 100)
print(buf.getvalue())

buf.write(b"foobar", 100, 100)
print(buf.getvalue())

Generative AI

I used generative AI tools when creating this PR, but a human has checked the
code and is responsible for the code and the description above.

Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
@Josverl Josverl added the docs label Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant