[Python-Dev] A small patch. (original) (raw)
Skip Montanaro skip at pobox.com
Wed Nov 6 21:39:17 CET 2013
- Previous message: [Python-Dev] A small patch.
- Next message: [Python-Dev] A small patch.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- assert 1 <= month <= 12, month + assert 1 <= month <= 12, 'month must be in 1..12'
In addition to Brett's comment, you might as well include the offending value in your AssertionError message. For example, a value of 0 probably tells you something different about your underlying bug than a value of 2013. Just knowing it's out of range isn't really enough.
Skip
- Previous message: [Python-Dev] A small patch.
- Next message: [Python-Dev] A small patch.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]