[issue43609] ast.unparse-ing a FunctionType gives ambiguous result

2021-03-23 Thread midori
New submission from midori : Hi all, this is probably my first issue here, so don't blame me if I do something wrong lol The ast.FunctionType gives syntax like (a, b) -> c for function types, this is ok, and also since Python 3.10 we can use X | Y to denote unions, this is ok. So G

[issue43609] ast.unparse-ing a FunctionType gives ambiguous result

2021-03-25 Thread midori
midori added the comment: @BTaskaya I've seen this in third party ides and type checker. For example they are referring to "Union[Callable[[], Union[int, str]], None]" as "() -> (int | str) | None" where there are pa