issue #2243 -- prefer f-strings over %-interpolation
edited docs to prefer f-strings, then str.format(), and remove %-interpolation additional ad-hoc documentation fixes, as opportunities seen: - replace Built-In Function (BIF) "min" variable with "mins" - prefer BIF str(var) over "%s" % var - reformat some code examples to clarify multiple args passed to functions - change some single-quote strings to double-quotes for consistency - fix mismatched parens misc edits: - add .vscode/ to gitignore
This commit is contained in:
parent
f45051050e
commit
851ca30be5
30 changed files with 207 additions and 193 deletions
|
|
@ -140,7 +140,7 @@ This is important, in order to know what variables we can use in our callback ou
|
|||
write a single line to be sure our callback is called when we expect it to:
|
||||
|
||||
```python
|
||||
character.msg("You just said {}.".format(message))
|
||||
character.msg(f"You just said {message}.")
|
||||
```
|
||||
|
||||
You can paste this line in-game, then type the `:wq` command to exit the editor and save your
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue