22.. Foundations 2: Python slides file, created by
33 hieroglyph-quickstart on Wed Apr 2 18:42:06 2014.
44
5- *******************************************************
6- Session Seven: More OO -- Properties, special methods.
7- *******************************************************
5+ ***********************
6+ Session Seven: More OO
7+ ***********************
88
9- .. rst-class :: large centered
9+ .. rst-class :: medium centered
1010
11- | Multiple Inheritance,
12- | Properties,
13- | classmethods and staticmethods,
14- | Special (Magic) Methods
11+ .. container ::
12+
13+ Multiple Inheritance
14+
15+ Properties
16+
17+ Class methods and static methods
18+
19+ Special (Magic) Methods
1520
1621================
1722Review/Questions
@@ -67,25 +72,13 @@ Lightning Talks Today:
6772
6873.. rst-class :: medium
6974
70- Andrew P Klock
75+ Andrew P Klock
7176
72- Vinay Gupta
73-
74- Ousmane Conde
75-
76- Salim Hassan Hamed
77-
78-
79- Lightning Talks
80- ----------------
77+ Vinay Gupta
8178
82- .. rst-class :: medium
79+ Ousmane Conde
8380
84- |
85- | Ousmane Conde
86- |
87- | Salim Hassan Hamed
88- |
81+ Salim Hassan Hamed
8982
9083
9184===================
@@ -100,7 +93,7 @@ More on Subclassing
10093
10194 http://pyvideo.org/video/879/the-art-of-subclassing
10295
103- If you haven't watched, It's well worth your time
96+ If you haven't watched it , It's well worth your time
10497
10598
10699What's a Subclass For?
@@ -161,7 +154,7 @@ So why would you want to do this? One reason: *mixins*
161154
162155Provides an subset of expected functionality in a re-usable package.
163156
164- Why would you want to do this?
157+ Huh? this is why --
165158
166159Hierarchies are not always simple:
167160
@@ -229,8 +222,9 @@ Caution: There are some subtle differences with multiple inheritance.
229222
230223You can use explicit calling to ensure that the 'right' method is called.
231224
225+ .. rst-class :: medium
232226
233- .. nextslide :: Background
227+ ** Background **
234228
235229Two seminal articles about ``super() ``:
236230
@@ -422,7 +416,7 @@ Lightning Talks
422416Static and Class Methods
423417========================
424418
425- .. rst-class :: left build
419+ .. rst-class :: left build
426420.. container ::
427421
428422 You've seen how methods of a class are *bound * to an instance when it is
@@ -461,7 +455,6 @@ A *static method* is a method that doesn't get self:
461455[demo: :download: `static_method.py <../../Examples/Session07/static_method.py >`]
462456
463457
464-
465458.. nextslide :: Why?
466459
467460.. rst-class :: build
@@ -725,8 +718,26 @@ There's more to read about the details of implementing these methods:
725718* https://docs.python.org/2/reference/datamodel.html#special-method-names
726719* http://www.rafekettler.com/magicmethods.html
727720
728- Be a bit cautious about the code examples in that last one. It uses quite a bit
729- of old-style class definitions, which should not be emulated.
721+
722+ Lightning Talks
723+ ----------------
724+
725+ .. rst-class :: medium
726+
727+ |
728+ | Ousmane Conde
729+ |
730+ | Salim Hassan Hamed
731+ |
732+
733+ LAB
734+ ----
735+
736+ Let's complete our nifty Circle class:
737+
738+ Steps 5-8 of:
739+
740+ :ref: `homework_circle_class `
730741
731742
732743========
@@ -735,4 +746,6 @@ Homework
735746
736747Complete the Circle class
737748
738- Decide what you are going to do for your proejct,
749+ Decide what you are going to do for your proejct, and send me a simple proposal.
750+
751+
0 commit comments