6 Commits
Author SHA1 Message Date
FichteFoll a44de46a00 use_builtin_types is optional for plistlib.load (#1738) 2017-11-11 16:54:11 -08:00
FichteFoll f933b9384c Refine str.maketrans and str.translate (#1613)
str.translate requires a Mapping or Sequence (in essence, anything
with __getitem__), not a Dict.

str.maketrans in the one-argument form only converts character string
keys to their unicode ordinal, leaving any of the values untouched.
This mapping may use both integers or strings as keys at the same time.

str.maketrans in the multi-argument form returns a dict with any of the
values str, int or None, as recognized by str.translate.
2017-11-07 18:55:05 -08:00
FichteFoll 8b6234ad2c Use self-type in asyncio.Future.*_done_callback (#1614) 2017-10-10 10:06:57 -07:00
FichteFoll cc3e753202 All loop kwargs in asyncio.streams are optional (#1615)
I verified this with the module code. All these loop arguments default
to `None` and are set with `events.get_event_loop()` if this is the
case.
2017-09-18 07:51:25 -07:00
FichteFoll d492c5360d pprint stream type (#178)
* Use less strict IO[str] instead of TextIO

* IO[Any] should be IO[str]

See also discussion in #17.
2016-05-03 11:48:38 -07:00
FichteFoll 6537649fda json.dump{s,}' indent parameter also supports str (#175) 2016-05-01 17:50:03 -07:00