Files
typeshed/stdlib/2and3
Jelle Zijlstra adeda24fce open: introduce concrete return types (#4146)
* make io classes inherit from typing IO classes

This makes these classes usable if type annotations are given as "IO"
or "TextIO". In the future, we'll then be able to move open() to
return a concrete class instead (#3951).

* open: introduce concrete return types

Fixes #3951.

We use the values of the "mode" and "buffering" arguments to figure out
the concrete type open() will return at runtime. (Compare the CPython
code in https://github.com/python/cpython/blob/master/Modules/_io/_iomodule.c#L231.)
2020-06-01 00:48:12 +02:00
..
2020-02-21 21:27:42 -08:00
2019-10-12 02:45:43 +02:00
2020-04-22 20:02:19 +02:00
2020-05-24 17:53:03 -07:00
2020-04-22 20:02:19 +02:00
2018-09-25 20:23:02 -07:00
2020-05-27 21:42:32 -07:00
2019-12-21 14:48:00 -08:00
2020-05-27 21:42:45 -07:00
2020-02-29 14:18:06 +01:00
2019-10-16 17:11:23 +02:00
2017-04-24 15:05:02 -07:00
2020-05-24 17:41:45 -07:00
2020-05-17 08:59:11 -07:00
2020-03-17 19:44:51 +01:00
2019-09-23 18:24:05 +02:00
2019-11-25 19:46:28 -08:00
2020-01-19 21:04:43 +01:00
2018-06-11 11:26:32 -07:00
2020-03-06 11:07:52 +01:00
2017-04-27 08:14:21 -07:00
2020-05-24 20:38:18 -07:00
2020-01-20 09:02:23 +01:00
2017-04-24 13:55:33 -07:00
2020-03-18 17:47:17 -07:00
2017-03-19 13:08:54 -07:00
2016-08-05 12:04:01 -07:00
2017-05-25 19:39:15 -07:00
2020-02-27 19:18:54 -08:00
2017-03-21 05:54:48 -07:00
2020-02-05 13:06:31 +01:00
2020-05-16 21:30:45 -07:00
2020-02-01 13:44:55 -08:00