Skip to content

Commit 7cd6e7e

Browse files
committed
Bugfix
1 parent d0ef4f5 commit 7cd6e7e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

slides/02_traits.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ class Child(HasStrictTraits):
200200

201201
@observe('father.last_name')
202202
def _dad_name_updated(self, event):
203-
print(Father name changed to', self.father.last_name)
203+
print('Father name changed to', self.father.last_name)
204204

205205
```
206206

207207
```python
208208
dad = Parent(last_name='Zubizaretta')
209-
c = Child(father=Parent)
209+
c = Child(father=dad)
210210
```
211211

212212
```python
@@ -426,7 +426,7 @@ Hint: Use `os.listdir` and `os.path.getsize`
426426
from math import pi
427427
from traits.api import Range, Float, Property, cached_property
428428

429-
class Circle(HasTraits):
429+
class Circle(HasStrictTraits):
430430
radius = Range(0.0, 1000.0)
431431
area = Property(Float, observe='radius')
432432

@@ -459,7 +459,7 @@ c.area
459459
import numpy as np
460460
from traits.api import Array, Range, observe
461461

462-
class Beats(HasTraits):
462+
class Beats(HasStrictTraits):
463463
f1 = Range(1.0, 200.0, value=100)
464464
f2 = Range(low=1.0, high=200.0, value=104)
465465
signal = Array(dtype=float, shape=(None,))
@@ -504,7 +504,7 @@ t = Thing()
504504
```
505505

506506
```python
507-
type(c.age)
507+
type(t.age)
508508
```
509509

510510
<!-- #region slideshow={"slide_type": "slide"} -->
@@ -569,6 +569,7 @@ import PIL.Image
569569
with PIL.Image.open(filepath) as img:
570570
data = np.asarray(img)
571571
```
572+
- Example images available at `ets_tutorial/sample_images` for testing
572573

573574
<!-- #endregion -->
574575

0 commit comments

Comments
 (0)