swcarpentry / python-novice-inflammation

Programming with Python
http://swcarpentry.github.io/python-novice-inflammation/
Other
303 stars 781 forks source link

Cliffhanger in "Defensive Programming" #1041

Open BootzenKatzen opened 1 year ago

BootzenKatzen commented 1 year ago

It feels like the "Test-Driven Development" section of the Defensive Programming chapter ends on a cliffhanger. It gives us the tip "always initialize from data" but doesn't show an example of doing that. I had to email and ask, because I wasn't sure how to create the variable without assigning a value. They sent me an example of the code where they were initialized as "None." It also would have been nice to see a working version of the function just as an example, possibly with some notes in cases where lines directly correspond to certain asserts. I just like knowing how everything wraps up.

I have found this course very helpful on the whole though, so keep up the good work!