Skip to content

Fix memset call in basic_concepts user guide - #2368

Open
antonwolfy wants to merge 1 commit into
masterfrom
fix-basic-concepts-memset-doc
Open

Fix memset call in basic_concepts user guide#2368
antonwolfy wants to merge 1 commit into
masterfrom
fix-basic-concepts-memset-doc

Conversation

@antonwolfy

Copy link
Copy Markdown
Collaborator

Summary

Fixes a broken example in the "Basic Concepts" user guide.

The snippet on basic_concepts.rst:195 called:

>>> mem_s.memset(value=ord(b"-""))

Two problems:

  • _Memory.memset's parameter is named val, not value, so the keyword argument raises TypeError.
  • ord(b"-"") has a stray extra double-quote, which is a SyntaxError.

Corrected to:

>>> mem_s.memset(val=ord(b"-"))

Documentation-only change; no code or behavior is affected.

The example on line 195 called mem_s.memset(value=...), but
_Memory.memset's parameter is named val. It also had a stray
extra quote in ord(b"-""). Correct both so the snippet runs.
@github-actions

Copy link
Copy Markdown

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 74.462%fix-basic-concepts-memset-doc into master. No base build found for master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants