From 959de083eadfb63419737e4ea8c0b646d97f2aa0 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Mon, 13 Jul 2009 22:12:11 -0400 Subject: [PATCH] added sidebar about special methods --- dip3.css | 10 +++++++++- iterators.html | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) mode change 100644 => 100755 dip3.css diff --git a/dip3.css b/dip3.css old mode 100644 new mode 100755 index a75b58d..6c70a30 --- a/dip3.css +++ b/dip3.css @@ -47,7 +47,7 @@ Classname Legend .note = "note/caution/important" = indented block for tips/gotchas/language comparisons .baa = "best available ampersand" = wrapper block for ampersands - +.ots = "on the side" = an aside that is set in normal type (as opposed to a big blue pullquote) Acknowledgements & Inspirations @@ -283,6 +283,14 @@ aside { -webkit-border-radius: 1em; border-radius: 1em; } +aside.ots { + font-style: normal; + font-size: medium; + line-height: 1.75; +} +aside a { + color: #fff !important; +} /* previous/next navigation links */ diff --git a/iterators.html b/iterators.html index 0f7795c..573c47b 100755 --- a/iterators.html +++ b/iterators.html @@ -158,6 +158,10 @@ body{counter-reset:h1 6}

Now you’re ready to learn how to build an iterator. An iterator is just a class that defines an __iter__() method. +

+

[download fibonacci2.py]

class Fib:                                        
     def __init__(self, max):