Jarry Shaw added the comment:
Apparently static checkers like mypy doesn't rely on the
`typing.get_type_hints` function to implement its type checking functions (as I
had browsed through the code repo).
$ cat test.py
def foo(arg) -> ' str': ...
$ mypy test.py
Success: no
Jarry Shaw added the comment:
To me, I discovered this issue because of a typo in my code. And apparently, I
do not suggest people will write their type annotations with leading
whitespaces purposely.
Here’s another thing though: aligning the behaviour of the two builtin
functions is good
Jarry Shaw added the comment:
> as discussed in https://bugs.python.org/issue41887
After some additional thoughts, I am thinking that changing the behaviour of
``compile`` in ``'eval'`` mode directly might be a better idea, for consistency
all over the builtin functions.
Es
Change by Jarry Shaw :
--
keywords: +patch
pull_requests: +24209
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25484
___
Python tracker
<https://bugs.python.org/issu
New submission from Jarry Shaw :
`typing.get_type_hints` does not accept type annotations (in string capsulated
form) with leading whitespaces.
```
>>> def foo(arg) -> ' str': ...
>>> typing.get_type_hints(foo)
Traceback (most recent call last):
File &quo
Jarry Shaw added the comment:
Chris' patch works on macOS 10.14 (Mojave); but after it terminates, tty
attributes are not restored (new-lines are missing). btw, I've implemented a
workaround library with solution through either `ps` command or `psutil`
package, see `ptyn
Jarry Shaw added the comment:
This issue is duplicated with issue26228, sorry.
--
stage: patch review -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.org/i
Change by Jarry Shaw :
--
pull_requests: +8930
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34785>
___
___
Python-bugs-list mai
New submission from Jarry Shaw :
As in pty.spawn, once started, the parent process will be hanged, even if the
child process is already dead (or a zombie), and must wait for a
KeyboardInterrupt or else to terminate the whole process.
Thus, I propose to revise `_copy` function, where the