In case you want your Python lists to look like Clojure lists:
class L(list):
def __init__(self, *items):
super(L, self).__init__(items)
def __repr__(self):
return "(" + " ".join(repr(x) for x in self) + ")"
pass
>>> L(1, 2, 3)
(1 2 3)
>>> L(1, 2, 3, L(4, 5, 6))
(1 2 3 (4 5 6))
.. but the abstraction leaks a bit (a lot):
>>> L(1, 2, 3, L(4, 5, 6))[:]
[1, 2, 3, (4 5 6)]
>>> L(1, 2, 3, L(4, 5, 6))[1:]
[2, 3, (4 5 6)]
"Why would you want this?" You probably woudn't. 😅