News for hackers. Stuff that matters.
Re:Ask HN: What's the most beautiful code written in Python ... by git-pull on Monday June 12, 2017 @02:34AM (#14535496)
SQLAlchemy:

https://github.com/zzzeek/sqlalchemy

http://docs.sqlalchemy.org/en/latest/

https://www.youtube.com/watch?v=vunIDi9Z-_8 (Introduction to SQLAlchemy, 2014, 2:52:50)

http://www.aosabook.org/en/sqlalchemy.html (Overview in The Architecture of Open Source Applications)

Re:Ask HN: What's the most beautiful code written in Python ... by sharmi on Sunday June 11, 2017 @06:03AM (#14531396)
This was back in 2005-2006. I was working with a guy who loves to code. His favorite way to spend the weekend was to figure out ways to make our services more robust and optimized. He had one major disadvantage.

His forgetfulness was legendary. He could barely remember what happened in the morning or what code he wrote. He made this his strength by writing the cleanest and well-structured code I have ever seen. So, not only him, but anyone, without any prior knowledge, can jump into the code at any point in time and immediately understand the flow and be productive. Obviously, it helps that the code was in Python, but being in python by itself does not a great code make.

Re:Ask HN: What's the most beautiful code written in Python ... by navbaker on Saturday June 10, 2017 @09:47PM (#14530201)
I once programmed a complete chess board in four lines of code:

>import chess

>import chess.svg

>board = chess.Board()

>board

I'm pretty sure I'm a genius.

Re:Ask HN: What's the most beautiful code written in Python ... by RUG3Y on Sunday June 11, 2017 @10:22PM (#14534884)
I've said this in other threads recently - The Flask source code is really awesome and reading helped me learn Python better.
Re:Ask HN: What's the most beautiful code written in Python ... by tcbawo on Saturday June 10, 2017 @10:09PM (#14530257)
I've enjoyed reading a lot of Peter Norvig's python code. There is his Lisp implemention (http://norvig.com/lispy.html). He also created a spell checker that was an informative and interesting read.
Re:Ask HN: What's the most beautiful code written in Python ... by svisser on Saturday June 10, 2017 @11:12PM (#14530411)
Re:Ask HN: What's the most beautiful code written in Python ... by teapot01 on Saturday June 10, 2017 @10:44PM (#14530351)
Go to python repl

> import this