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.
This commit is contained in:
Fred Drake 2002-11-13 15:32:34 +00:00
parent c0b4034b81
commit ce5619e8a1
1 changed files with 5 additions and 3 deletions

View File

@ -245,9 +245,11 @@ involved).
(In particular, converting a string adds quotes around it and converts (In particular, converting a string adds quotes around it and converts
``funny'' characters to escape sequences that are safe to print.) ``funny'' characters to escape sequences that are safe to print.)
It is illegal to attempt to convert recursive objects (e.g., lists or Recursive objects (for example, lists or dictionaries that contain a
dictionaries that contain a reference to themselves, directly or reference to themselves, directly or indirectly) use \samp{...} to
indirectly.) indicate a recursive reference, and the result cannot be passed to
\function{eval()} to get an equal value (\exception{SyntaxError} will
be raised instead).
\obindex{recursive} \obindex{recursive}
The built-in function \function{repr()} performs exactly the same The built-in function \function{repr()} performs exactly the same