Browse Source

Update notes

master
Dimitri Merejkowsky 5 years ago
parent
commit
763a63f4eb
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      notes.md

+ 9
- 0
notes.md View File

@@ -2,6 +2,15 @@ Ce fichier contient diverses notes utiles à la préparation des futurs cours.


# Sujets à évoquer # Sujets à évoquer


## bits
* dict: setdefault
* listes: pop prend un argument
* slices takes a step too [::-1] -> reverse
* with: contextmanager, ContextDecorator

## big stuff

* exceptions: try, catch, finally
* short circuit in if: `if a is not None and a.b == 42` * short circuit in if: `if a is not None and a.b == 42`
* files: "wa", accès séquentiel (chunk = file.read(chunk_size)) * files: "wa", accès séquentiel (chunk = file.read(chunk_size))
* style: trailing white space, editor configuration, * style: trailing white space, editor configuration,