trying to get the syntax of the Python 3.7 new dataclass right.
if I want to include a datetime value in my dataclass,
import datetime
from dataclasses import dataclass
@dataclass
class MyExampleWithDateTime:
mystring: str
myint: int
mydatetime: ???
What should I write for ??? for a datetime field?
Like this:
@dataclass
class MyExampleWithDateTime:
mystring: str
myint: int
mydatetime: datetime.datetime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With