mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
skeleton of advanced iterators chapter
This commit is contained in:
+2
-3
@@ -4,7 +4,7 @@
|
||||
<title>Unit testing - Dive into Python 3</title>
|
||||
<link rel=stylesheet type=text/css href=dip3.css>
|
||||
<style>
|
||||
body{counter-reset:h1 7}
|
||||
body{counter-reset:h1 8}
|
||||
</style>
|
||||
</head>
|
||||
<form action=http://www.google.com/cse><div><input type=hidden name=cx value=014021643941856155761:l5eihuescdw><input type=hidden name=ie value=UTF-8> <input name=q size=31> <input type=submit name=root value=Search></div></form>
|
||||
@@ -15,8 +15,7 @@ body{counter-reset:h1 7}
|
||||
</blockquote>
|
||||
<p id=toc>
|
||||
<h2 id=divingin>(Not) Diving In</h2>
|
||||
<p class=f>How do you know that the code you wrote yesterday still works after the changes you made today? Every seasoned programmer has war stories of an “innocent” change that couldn't <em>possibly</em> have affected that other “unrelated” module… If this sounds familiar, this chapter is for you.
|
||||
<p>In this chapter, you're going to write and debug a set of utility functions to convert to and from Roman numerals. You saw the mechanics of constructing and validating Roman numerals in <a href="regular-expressions.html#romannumerals">“Case study: roman numerals”</a>. Now step back and consider what it would take to expand that into a two-way utility.
|
||||
<p class=f>In this chapter, you're going to write and debug a set of utility functions to convert to and from Roman numerals. You saw the mechanics of constructing and validating Roman numerals in <a href="regular-expressions.html#romannumerals">“Case study: roman numerals”</a>. Now step back and consider what it would take to expand that into a two-way utility.
|
||||
<p><a href="regular-expressions.html#romannumerals">The rules for Roman numerals</a> lead to a number of interesting observations:
|
||||
<ol>
|
||||
<li>There is only one correct way to represent a particular number as Roman numerals.
|
||||
|
||||
Reference in New Issue
Block a user