Skip to content

Commit a399d2d

Browse files
Interpolation caveat and typo (#848)
1 parent 77d144a commit a399d2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ and also by providing more type information to the Julia compiler.
364364
Python's [`eval`](https://docs.python.org/3/library/functions.html#eval) function, and returns the result
365365
converted to `PyAny`. Alternatively, `py"..."o` returns the raw `PyObject`
366366
(which can then be manually converted if desired). You can interpolate
367-
Julia variables and other expressions into the Python code with `$`,
367+
Julia variables and other expressions into the Python code (except for into
368+
Python strings contained in Python code), with `$`,
368369
which interpolates the *value* (converted to `PyObject`) of the given
369370
expression---data is not passed as a string, so this is different from
370371
ordinary Julia string interpolation. e.g. `py"sum($([1,2,3]))"` calls the
@@ -392,7 +393,7 @@ and also by providing more type information to the Julia compiler.
392393
* `pybuiltin(s)`: Look up `s` (a string or symbol) among the global Python
393394
builtins. If `s` is a string it returns a `PyObject`, while if `s` is a
394395
symbol it returns the builtin converted to `PyAny`. (You can also use `py"s"`
395-
to look up builtins or other Python globas.)
396+
to look up builtins or other Python globals.)
396397

397398
Occasionally, you may need to pass a keyword argument to Python that
398399
is a [reserved word](https://en.wikipedia.org/wiki/Reserved_word) in Julia.

0 commit comments

Comments
 (0)