From b2a13ad20c1d0ec4755cacfa8ae4b28967459aa8 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Sun, 12 Apr 2009 01:31:18 -0400 Subject: [PATCH] typos and quotations --- refactoring.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refactoring.html b/refactoring.html index 1693443..97e6ddf 100644 --- a/refactoring.html +++ b/refactoring.html @@ -12,14 +12,14 @@ body{counter-reset:h1 10}

You are here: Home Dive Into Python 3

Refactoring

-

FIXME
— FIXME +

After one has played a vast quantity of notes and more notes, it is simplicity that emerges as the crowning reward of art.
Frédéric Chopin

 

Diving In

Despite your best efforts to write comprehensive unit tests, bugs happen. What do I mean by “bug”? A bug is a test case you haven't written yet. -

>>> import roman6
->>> roman6.from_roman("") 
+
>>> import roman7
+>>> roman7.from_roman("") 
 0
  1. Remember in the [FIXME-xref] previous section when you kept seeing that an empty string would match the regular expression you were using to check for valid Roman numerals? Well, it turns out that this is still true for the final version of the regular expression. And that's a bug; you want an empty string to raise an InvalidRomanNumeralError exception just like any other sequence of characters that don't represent a valid Roman numeral.