swincas / cookies-n-code

A repo for code review sessions at CAS
http://astronomy.swin.edu.au/
MIT License
30 stars 34 forks source link

Added tutorial on Python decorators and factories #42

Closed 1313e closed 5 years ago

abatten commented 5 years ago

You know this would have been the perfect use case for a jupyter notebook. :P But I'll let this slide. This looks fine to merge. I'm thinking squash merge right @manodeep?

jacobseiler commented 5 years ago

Is it possible to add a "Wrapping Up" Section to the end of this? Basically summarising the main/key points. You could also add a few links for further reading (e.g., the pycon2019 presentation on decorators).

1313e commented 5 years ago

@jacobseiler Sure. @abatten I know, I was thinking about making one. However, as much as I dislike them, I have very rarely used them and therefore don't really know well enough how to write them properly.

manodeep commented 5 years ago

Looks good to me. @1313e - please let me know if you are planning to implement @jacobseiler suggestion - I do think that a "Take-away" section will be beneficial for people skimming the material.

Once you are finished, I am happy to merge the PR.

1313e commented 5 years ago

@manodeep I already did what Jacob asked for.

1313e commented 5 years ago

Ugh, I just found out that I forgot a whiteline somewhere. @manodeep Can you add a whiteline between lines 239 and 240 in the README.rst of the decorators review?