Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
packetlost
· 5y ago · 0 comments
Heads up to anyone wanting to go through this book and use the code samples: they're all in Python 2.
Don't let it deter you though, it's a fantastic book.
Comments
[–]
TeamTeaTime
5y ago
I'm working through this now and have been able to run all the Python code I've come across so far with Python 3. For example
https://github.com/remzi-arpacidusseau/ostep-homework/blob/m...
is written to run under either 2 or 3.
[–]
packetlost
OP
5y ago
Hmm, perhaps I somehow ended up with a really old copy of the code. I downloaded a tar.gz or zip file with a bunch of Python 2-only code (it definitely did not run under Python 3, I ran it under `2to3` without issue) directly from the wisc.edu site.
[–]
idolaspecus
5y ago
My memory was telling me the examples were all in C, so I went just now and picked a few random chapters, and the examples I saw were in C.
[–]
packetlost
OP
5y ago
The book has a ton of C code snippets, and some other code examples, but all of the 'homework' problems are in Python.