Skip to content
Commits on Source (3)
......@@ -608,10 +608,10 @@ class Pair(Object):
return "#<{n}:{s}>".format(n=self.__class__.__name__, s=self)
def __repr__(self, obset=None):
if obset is None:
print("start anew with pair", id(self))
# print("start anew with pair", id(self))
obset = set()
if self in obset:
print("already seen pair", id(self))
# print("already seen pair", id(self))
return "<...>"
obset.add(self)
result = ["("]
......@@ -629,7 +629,7 @@ class Pair(Object):
result.append(repr(el))
if current is not Nil:
result.append(" . ")
result.append(str(current))
result.append(repr(current))
result.append(")")
return "".join(result)
def __str__(self):
......
......@@ -32,7 +32,7 @@ ovc, argv = posix_getopts.parse({
"t": [0, bool, "traceback", "print python tracebacks on error"],
"l": [[], str, "loadfiles", "load file(s)"],
"d": [[], str, "debugflags", "set debug flag(s)"],
"r": [100000, int, "recursion_limit", "set recursion limit"],
"r": [10000, int, "recursion_limit", "set recursion limit"],
"s": [0, bool, "evalstack", "print eval stack or error"],
"L": [default_loadpath, str, "loadpath", "set the load path"],
"e": [0, bool, "exit_on_error", "exit on error"],
......
......@@ -832,9 +832,9 @@
((x 1 x 3) . (1 x 3)))
(setf b '(3 4 5 6 7))
(test incf0 (progn (incf (car b) 2)
b)
(5 4 5 6 7))
;; (test incf0 (progn (incf (car b) 2)
;; b)
;; (5 4 5 6 7))
;; (test decf0 (progn (decf (cddr b))
;; b)
......