You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -847,29 +847,6 @@ The limitation here is that while a human can reasonably understand that ``is_nu
847
847
848
848
With custom types and inference this is not always possible so exceptions are made, but every effort should be exhausted to avoid ``cast`` before going down such paths.
849
849
850
-
Syntax Requirements
851
-
~~~~~~~~~~~~~~~~~~~
852
-
853
-
Because *pandas* still supports Python 3.5, :pep:`526` does not apply and variables **must** be annotated with type comments. Specifically, this is a valid annotation within pandas:
854
-
855
-
.. code-block:: python
856
-
857
-
primes = [] # type:List[int]
858
-
859
-
Whereas this is **NOT** allowed:
860
-
861
-
.. code-block:: python
862
-
863
-
primes: List[int] = [] # not supported in Python 3.5!
864
-
865
-
Note that function signatures can always be annotated per :pep:`3107`:
866
-
867
-
.. code-block:: python
868
-
869
-
defsum_of_primes(primes: List[int] = []) -> int:
870
-
...
871
-
872
-
873
850
Pandas-specific Types
874
851
~~~~~~~~~~~~~~~~~~~~~
875
852
@@ -1296,7 +1273,7 @@ environment by::
1296
1273
1297
1274
or, to use a specific Python interpreter,::
1298
1275
1299
-
asv run -e -E existing:python3.5
1276
+
asv run -e -E existing:python3.6
1300
1277
1301
1278
This will display stderr from the benchmarks, and use your local
0 commit comments