Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python also formats their parentheses the non lisp way. You typically format things like this:

  data = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9, [10, 11, 12]]
  ]
Any language that uses closing symbols formats them that way, in Pyhton in Java, in C etc. Lisp is the only example where they don't properly indent closing symbols and instead just put them all together at the last statement.


Yet most Python code is written in the compact form I've showed you, where code indentation is significant. Lisp has the same model: the code indentation is significant. But Lisp has the structure encoded in nested lists. These nested lists are automatically formatted in the same space saving way as Python code. Due to the significant indentation, Python usually can avoid to have grouping characters/symbols.

I see also lots of Python code where data isn't written like you claim...

https://www.programiz.com/python-programming/matrix




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: