Skip to content

Commit 6f84158

Browse files
authored
Improve IO.inspect/2 docs with regards to devices (#13561)
- Mention it prints to the standard output - Refer to `IO.inspect/3` for printing in other devices
1 parent d7ea2fa commit 6f84158

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/io.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ defmodule IO do
416416
end
417417

418418
@doc """
419-
Inspects and writes the given `item` to the device.
419+
Inspects and writes the given `item` to the standard output.
420420
421421
It's important to note that it returns the given `item` unchanged.
422422
This makes it possible to "spy" on values by inserting an
@@ -432,6 +432,7 @@ defmodule IO do
432432
The label will be printed before the inspected `item`.
433433
434434
See `Inspect.Opts` for a full list of remaining formatting options.
435+
To print to other IO devices, see `IO.inspect/3`
435436
436437
## Examples
437438

0 commit comments

Comments
 (0)