added credits to petbox examples

This commit is contained in:
Luciano Ramalho committed 2021-05-20 23:13:16 -03:00
1 parent 14e1758bf7
commit eb8982f924
2 files changed
+11 -1

No files matched your search

+5
View File
@@ -1,3 +1,8 @@
"""
Example adapted from `Atomic Kotlin` by Bruce Eckel & Svetlana Isakova,
chapter `Creating Generics`, section `Variance`.
"""
from typing import TypeVar, Generic, Any
+6 -1
View File
@@ -1,3 +1,8 @@
"""
Example adapted from `Atomic Kotlin` by Bruce Eckel & Svetlana Isakova,
chapter `Creating Generics`, section `Variance`.
"""
from typing import TYPE_CHECKING
from petbox import *
@@ -11,7 +16,7 @@ cat_box.put(si)
animal = cat_box.get()
#if TYPE_CHECKING:
# if TYPE_CHECKING:
# reveal_type(animal) # Revealed: petbox.Cat*