Skip to content

Commit aad6936

Browse files
author
Rick Riehle
committed
Comments
1 parent 59ab989 commit aad6936

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

notebooks/HowToGetInitToUseYourSetter.ipynb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"### In the following code we want to trigger the exception if we are not passwd Bob Jones"
8+
]
9+
},
310
{
411
"cell_type": "code",
512
"execution_count": 1,
@@ -56,6 +63,13 @@
5663
"bob.name"
5764
]
5865
},
66+
{
67+
"cell_type": "markdown",
68+
"metadata": {},
69+
"source": [
70+
"### Uh oh... Bob Smith is an invalid Bob... what went wrong? Let's try again...."
71+
]
72+
},
5973
{
6074
"cell_type": "code",
6175
"execution_count": 4,
@@ -104,6 +118,15 @@
104118
"bob = Person(\"Bob Smith\")"
105119
]
106120
},
121+
{
122+
"cell_type": "markdown",
123+
"metadata": {
124+
"collapsed": true
125+
},
126+
"source": [
127+
"### See the difference? Look at the declaration of name vs _name in the __init__"
128+
]
129+
},
107130
{
108131
"cell_type": "code",
109132
"execution_count": null,

0 commit comments

Comments
 (0)