Open
Description
We have some legacy references that are somewhat confusing for newcomers. Listing them here for later edit.
- The cheat sheet claims that
myDict.keys()
returns a list of keys when in fact it returns a view in py3 - There are references to
[range()]
vslist(range())
which produce different results under Python 3 and were found to be confusing. - https://pyformat.info as a good resource for
.format()
andf-strings
. - Relying too much on index based access can have performance impacts - mention
for a, b in zip(as, bs)
as alternative. Explainzip()
returns generator/iterator. - Avoid use of
.keys()
in for loops. - Update bokeh imports -
from bokeh.io import gridplot
is nowfrom bokeh.layouts import gridplot
- Introduce
with
and clarify that closing files is important. - There are some cases of
\
at the end of the line to visual line breaking. This was confusing in the context of\.format()
. - The text mentions
pip install
but since we are using anaconda we should probably install things withconda ...
- A few people ran into the situation where they accidentally emptied one of the provided files by opening it in
'w'
mode. Can we maybe make this more robust to avoid accidentally deleting the file or making a copy to simplify the process of recovering from this mistake.
Metadata
Metadata
Assignees
Labels
No labels