秋葉
e2ec5d0525
Make SyntaxError.text be optional ( #3119 )
...
Closes #3118
2019-07-15 09:11:45 +02:00
Brandt Bucher
34b47101dd
Slice attributes can be of any type. ( #3024 )
2019-07-11 12:13:32 -07:00
Chad Dombrova
e25c0cb128
"key" argument of builtin function sorted should be optional in python 2.7 ( #3086 )
2019-06-22 14:09:51 -07:00
Jadiker
5447ff6bfe
str and unicode format functions take objects ( #3068 )
2019-06-17 20:09:11 +02:00
Paul Dagnelie
d13eb937f7
Implement SupportsIndex ( #2996 )
2019-05-16 21:55:57 -07:00
Ivan Levkivskyi
75723e3885
Add an optional opener parameter to open() function ( #2977 )
...
Fixes #2976
2019-05-09 16:59:32 +02:00
Jelle Zijlstra
bdb1de57f5
narrow signature of __contains__ for str-like classes ( #2967 )
...
Fixes #2937
2019-05-07 10:24:28 -04:00
Jia Chen
c4b249c9a8
Use dunder parameter name in _Writer.write ( #2954 )
2019-05-04 22:51:39 -04:00
Brandt Bucher
1fddec3f90
Positional-only arguments for built-in functions. ( #2921 )
2019-04-30 11:22:25 +02:00
Benjamin Peterson
4e572ae6a3
Remove format_map from Python 2 unicode. ( #2933 )
2019-04-24 00:42:27 +01:00
Brandt Bucher
4230e6f313
Fix quit's argument and return types to match those of exit. ( #2915 )
...
Fixes #2912 .
2019-04-12 16:57:26 +02:00
Michael J. Sullivan
0350e9fa89
Fix some issues with __round__ ( #2907 )
...
In python 3, add an overload for there being no digits argument
and make it return int.
In python 2, __round__ doesn't exist and SupportsRound doesn't exist
in the typing module. Use SupportsFloat for python 2 round().
Remove decimal's __round__ overload that takes None, since it doesn't exist
2019-04-09 11:45:10 -07:00
Chen Li
598d0d6ae1
[builtins] Add 'AST' type to 'source' parameter for 'compile()' ( #2889 )
2019-03-27 08:29:16 +01:00
Michael J. Sullivan
c526975a1b
Add overloads for min/max that don't take default ( #2885 )
...
PR #2833 introduced more flexible handling for the type of the default
parameter, but the extra type variable caused some issues. Add another
overload for the case where there is no default param.
This is I think related to the issues we have had with `get` recently?
2019-03-25 15:38:21 -07:00
wouter bolsterlee
afe665690c
Add missing BaseException.__suppress_context__ attribute ( #2876 )
...
See also PEP 415: https://www.python.org/dev/peps/pep-0415/
Fixes #2875 .
2019-03-16 22:16:01 +01:00
Sebastian Rittau
26fefcc704
Use protocol for print() file argument ( #2848 )
...
Also, use object instead of Any for values list
2019-03-12 19:26:32 -07:00
Brandt Bucher
ab4c262043
Add isascii methods to str, bytes, and bytearray [Python 3.7]. ( #2834 )
2019-03-08 11:07:28 -08:00
herr kaste
4dcd516caa
Improve min/max ( #2833 )
...
* For min/max return Union type if default given
* For min/max mark keyword only arguments
* Also mark positional arguments
2019-03-08 19:25:34 +01:00
Aymeric Augustin
f0c5ac04b0
Support *contiguous attributes of memoryview. ( #2755 )
2019-02-09 16:05:00 +01:00
Michael J. Sullivan
d8faf503ec
Make SyntaxError.offset be optional (again) ( #2782 )
...
This was originally done in #2557 , but got lost in #2533 .
2019-02-08 11:09:18 -08:00
Utkarsh Gupta
ad803e1caa
builtins.pyi: Update __iadd__() and imul() in class list ( #2754 )
...
Fixes #2711
2019-01-21 21:57:15 +01:00
Jelle Zijlstra
78690405cf
add back StopIteration.value in Python 3 ( #2744 )
...
Fixes python/mypy#6209 .
2019-01-16 19:21:16 -08:00
Michael J. Sullivan
c75d42ef23
Fix the type of ord on python 2 ( #2735 )
...
It looks like it got messed up in #2533
2019-01-10 19:24:51 -06:00
Sebastian Rittau
eb1788ac39
Merge Python 2 and 3 builtins.pyi ( #2533 )
2018-12-21 07:12:41 -08:00