Training January 2024
Logistics
- Foresee the number of tables needed
- Give the link to the webpage in the mail
Standard types and basic statements
- Comments are used several times without being presented
- Wording of ex. 5 is confusing ("fields"?)
-
lvariable name can be mistaken by1 - Lots of slicing examples at the end of Shallow copy (too many?) Is
alluseful there ? - Ex 6 talks about iterating on the list but we didn't see list iterations.
- Exception example is not corresponding to the code example
Functions (basics)
- Separate introductory code snippet: first function without parameter, second function with parameter
- Docstrings are not explained but used in the first example
- Is duck typing worth presenting ?
🦆
Files
-
f-string in not needed in first example - Always Windows vs. Linux paths issues. Show equivalent code for Windows.
TP0
- There is list comprehension and
zipin the correction but it has not been seen before - Statistics might be wrong on the output of Exercise 14
- The full correction is not really possible to explain (regexp, logging, ...)
- The last part about default values is not really possible (shown as a dict which is not seen for now)
Data structures
- Ex 17 has default arguments but these were not seen yet
- Some things are just repetitions from the presentation of
list/tuple` before - Spend less time on
set? - No need to have a
isinstancewhen presenting looping over dict - Print of
d1is missing in the dict comprehension example (also the example is super confusing)
Functions (advanced)
- Examples are super-confusing. Even as a trainer, we don't really know what is the message of each example (expect showing what to not do).
- Example of the
printdocstring should come way before (to explain how to read the docstring) - Example for default arguments is confusing (
myfunc1callingmyfunc...)
TP1
- Corrections include bad habits (mutation of
dic_stationdefined outside the function)
Numpy, manipulating arrays
- Use a fixed matrix as example to avoid confusing states
- Remove
dtypes? Pandas does it much better.
Matplotlib
- First example is not really representative
Edited by Loic Huder