Skip to content

Commit 0359fd5

Browse files
committed
1 parent 2dada6d commit 0359fd5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/philosophy.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@ ssum = s1 + s2
4949
reveal_type(ssum)
5050
```
5151

52-
The above code (without the `reveal_type()` statements) will get a `Never`
53-
on the computation of `ssum` because it is
52+
The above code (without the `reveal_type()` statements) will get an error on the computation of `ssum` because it is
5453
inappropriate to add two series containing `Timestamp` values. The types will be
5554
revealed by `mypy` as follows:
5655

5756
```text
5857
ttest.py:5: note: Revealed type is "pandas.core.series.Series[pandas._libs.tslibs.timestamps.Timestamp]"
5958
ttest.py:7: note: Revealed type is "pandas.core.series.Series[pandas._libs.tslibs.timestamps.Timestamp]"
6059
ttest.py:9: note: Revealed type is "pandas.core.series.TimedeltaSeries"
61-
ttest.py:10: error: Need type annotation for "ssum" [var-annotated]
62-
ttest.py:11: note: Revealed type is "Never"
60+
ttest.py:10: error: Unsupported operand types for + ("Series[Timestamp]" and "Series[Timestamp]") [operator]
61+
ttest.py:11: note: Revealed type is "pandas.core.series.Series[pandas._libs.tslibs.timestamps.Timestamp]"
6362
```
6463

6564
The type `Series[Timestamp]` is the result of creating a series from `pd.to_datetime()`, while

0 commit comments

Comments
 (0)