1 Blog Entry tagged: book gems
Django Book Gems: assert False
Now that it's been officially released I've started re-reading the Django book, The Definitive Guide to Django: Web Development Done Right. I'm going to start a small series on nice little snippets on bits of great information from the book as I re-read it.
One I found today while reading Chapter 3 was this:
Are you the type of programmer who likes to debug with the help of carefully placed print statements? You can use the Django error page to do so—just without the print statements. At any point in your view, temporarily insert an
assert ...