Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce5619e

Browse files
committed
Update: Older versions of Python crashed when calling repr()
(including the implied call using back-ticks) of a recursive object, but this is no longer the case. Reported by Manus Hand via email.
1 parent c0b4034 commit ce5619e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/ref/ref5.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ \subsection{String conversions\label{string-conversions}}
245245
(In particular, converting a string adds quotes around it and converts
246246
``funny'' characters to escape sequences that are safe to print.)
247247
248-
It is illegal to attempt to convert recursive objects (e.g., lists or
249-
dictionaries that contain a reference to themselves, directly or
250-
indirectly.)
248+
Recursive objects (for example, lists or dictionaries that contain a
249+
reference to themselves, directly or indirectly) use \samp{...} to
250+
indicate a recursive reference, and the result cannot be passed to
251+
\function{eval()} to get an equal value (\exception{SyntaxError} will
252+
be raised instead).
251253
\obindex{recursive}
252254
253255
The built-in function \function{repr()} performs exactly the same

0 commit comments

Comments
 (0)