mCoding All Dunders Video
If you'd like to add a code example, make sure it has not already been done or is in progress (see the spreadsheet or the Issues tab for reference). Once you have confirmed that, open an issue for the dunder(s) you'd like to add examples for. When you're done, simply make a PR!
- The code has to be PEP8-compliant and lines must be at most 80 chars long
- Typehints are not necessary (unless needed for the example to work)
- Examples can include multiple dunders if they go together
- The code should be a minimal working example that uses the dunder(s)
When submitting code for the __cool_dunder__
dunder, name the file
cool_dunder.py
(basically strip the underlines). When submitting multiple
dunders in one example, you can:
- use the dunder name that's the most important/widely used, e.g.
name.py
when adding__name__
and__qualname__
- use a name that easily describes all of them, e.g.
comparisons.py
when adding__gt__
,__le__
, etc.
The file should be put in the corresponding folder inside src
, e.g. a
__post_init__
example should be located in src/library-lagoon/post_init.py
(see categories in the spreadsheet).