Skip to content

Commit eb8982f

Browse files
committed
added credits to petbox examples
1 parent 14e1758 commit eb8982f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

15-more-types/petbox/petbox.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Example adapted from `Atomic Kotlin` by Bruce Eckel & Svetlana Isakova,
3+
chapter `Creating Generics`, section `Variance`.
4+
"""
5+
16
from typing import TypeVar, Generic, Any
27

38

15-more-types/petbox/petbox_demo.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Example adapted from `Atomic Kotlin` by Bruce Eckel & Svetlana Isakova,
3+
chapter `Creating Generics`, section `Variance`.
4+
"""
5+
16
from typing import TYPE_CHECKING
27

38
from petbox import *
@@ -11,7 +16,7 @@
1116

1217
animal = cat_box.get()
1318

14-
#if TYPE_CHECKING:
19+
# if TYPE_CHECKING:
1520
# reveal_type(animal) # Revealed: petbox.Cat*
1621

1722

0 commit comments

Comments
 (0)