*print-readably* doc string is wrong or unclear

Description

The doc string of clojure.core/print-readably says:

When set to logical false, strings and characters will be printed with non-alphanumeric characters converted to the appropriate escape sequences.

This does not match how print-readably actually affects printing.

  • When print-readably is false, a 'non-alphanumeric' character such as newline prints as an actual newline (ASCII character 0x0a), not an 'escape sequence'.

  • When print-readably is true, strings are wrapped in double quotes, and in both strings and characters some characters are printed as escape sequences.

The doc string also doesn't say how print-readably might affect printing of other values, eg as with eduction. The purpose of the var is missing, namely printing for human versus machine consumers.

Environment

None

Assignee

Unassigned

Reporter

David Bürgin

Labels

Approval

Triaged

Patch

None

Affects versions

Priority

Minor