Open lfaraone opened 8 years ago
Yikes! Not sure how we missed this. We were even in touch with the author. @goldblatt had manually updated most of the references in our adaptation of the reading. Have you found specific issues in the readings that need to be addressed? It would certainly be nice for us to sync to the later version, but if our current adaptation is adequate this wouldn't be a top priority at the moment.
Hey-- yes I do know of this. It is updated to python3 (although my understanding is that it's not the 3rd edition, it's a version based on the 2nd edition). The issue with using it, is that it relies heavily on turtle graphics libraries which we weren't able to include in the course since not every school is able to use the graphics libraries.
Thanks for the context @goldblatt. From my reading, the text appears to be from the original "Think Python", see e.g. "Expressions and statements" (Gitbook, 1st edition):
A statement is a unit of code that the Python interpreter can execute. We have seen two kinds of statement: print and assignment.
The wording in the 2nd edition differs:
A statement is an instruction that the Python interpreter can execute. We have seen two kinds of statements: print and assignment.
That said, both of the above are inaccurate for Python 3 (print
is a function, not a statement).
Compare the 3rd edition:
A statement is an instruction that the Python interpreter can execute. We have only seen the assignment statement so far. Some other kinds of statements that we’ll see shortly are
while
statements,for
statements,if
statements, andimport
statements. (There are other kinds too!)
As an aside: are we making major modifications to the various texts, or are we using excerpts essentially unmodified? Rather than importing everything into Gitbooks, would it be less work to just link to the relevant sections?
I've noticed a few cases of strange markup that probably is the result of the text being moved to Markdown, such as in Operators and Operands:
Operators are special symbols that represent computations like addition and multiplication. The values the operator is applied to are called operands.
The operators +, -, , / and * perform addition, subtraction, multiplication, division and exponentiation, as in the following examples:
20+32 hour-1 hour_60+minute minute/60 5_2 (5+9)(15-7) In some other languages, ^ is used for exponentiation, but in Python it is a bitwise operator called XOR. We won’t cover bitwise operators in this book, but you can read about them at http://wiki.Python.org/moin/BitwiseOperators. Exponentiation in Python3 is **. In Python 3, the division operator might not do what you expect:
I know we've done a fair amount of shortening, simplifying, and adding supporting examples from SNAP! So I don't think it would be super easy to sync ahead. Perhaps the best course of action is to identify any remaining Python3 mistakes in the current text and open issues to track and fix them individually?
"Think Python" has since been updated, both to improve the text and migrate it to Python 3.
See How to Think Like a Computer Scientist: Learning with Python 3.