sync with O'Reilly Atlas
This commit is contained in:
7
05-data-classes/meaning/demo_nt.py
Normal file
7
05-data-classes/meaning/demo_nt.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import typing
|
||||
|
||||
class DemoNTClass(typing.NamedTuple):
|
||||
|
||||
a: int # <1>
|
||||
b: float = 1.1 # <2>
|
||||
c = 'spam' # <3>
|
||||
Reference in New Issue
Block a user