New submission from Vladislav Serebrennikov <brainv...@gmail.com>:

When source code is not available, "typing.Union[T, NoneType]" is what 
autocompletion engines left with, if they don't have additional logic to cover 
this case. Which is noisy compared to typing.Optional[T].

Usecase when source code is not available

Consider the following: C++ library has C++ plugins, supplied by user. It 
provides Python wrappers for their functions, dynamically filling out their 
type annotations.

----------
components: Library (Lib)
messages: 367278
nosy: Endill
priority: normal
severity: normal
status: open
title: No straightforward way to get repr of Optional
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40389>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to