carpentries-lab / python-aos-lesson

Python for Atmosphere and Ocean Scientists
https://carpentries-lab.github.io/python-aos-lesson/
Other
87 stars 49 forks source link

Less asserts, more catching and raising errors #55

Closed DamienIrving closed 2 years ago

DamienIrving commented 2 years ago

Resolves #36

DamienIrving commented 2 years ago

@hot007 @sarahymurphy - As maintainers on these PyAOS lessons I just wanted to let you know that in response to feedback from the workshops we did for the AMS and ICSHMO (see #36) I've done a re-write of the defensive programming lesson.

Feel free to post comments/feedback on this PR.

If you'd like to see what the new lesson would actually look like on the web, you can view my fork at https://damienirving.github.io/python-aos-lesson/08-defensive/index.html

dopplershift commented 2 years ago

@DamienIrving I think this does a much better job hitting best practice with regards to communicating errors and not using asserts as a universal solution.

hot007 commented 2 years ago

Sorry for the slow feedback by the way, was very busy with another deadline!

DamienIrving commented 2 years ago

Thanks, @hot007! I've implemented your suggestions in https://github.com/carpentries-lab/python-aos-lesson/commit/3a83ac687c0081275670427a74f78bc7772e9938