From c05570cf00698c3f8942cc3c8de37fc4de6f17db Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 26 Apr 2017 08:15:38 -0700 Subject: [PATCH] fix example in README.md (#1217) "int or float" isn't valid. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2335936d7..e3c0f98e3 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,15 @@ of the stub files. The below is an excerpt from the types for the `datetime` module. ```python +from typing import Union + MAXYEAR = ... # type: int MINYEAR = ... # type: int class date(object): def __init__(self, year: int, month: int, day: int) -> None: ... @classmethod - def fromtimestamp(cls, timestamp: int or float) -> date: ... + def fromtimestamp(cls, timestamp: Union[int, float]) -> date: ... @classmethod def fromordinal(cls, ordinal: int) -> date: ... @classmethod