Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kavigupta committed Sep 10, 2024
1 parent 03c5cab commit ae1b234
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions s_expression_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def __repr__(self):
if id(current) in repr_each:
continue
if id(current.car) in repr_each and id(current.cdr) in repr_each:
repr_each[id(current)] = (
f"Pair({repr_each[id(current.car)]}, {repr_each[id(current.cdr)]})"
repr_car, repr_cdr = (
repr_each[id(current.car)],
repr_each[id(current.cdr)],
)
repr_each[id(current)] = f"Pair({repr_car}, {repr_cdr})"
continue
if id(current) in attempted:
return "..."
Expand Down

0 comments on commit ae1b234

Please sign in to comment.