[issue44711] Optimize type check in pipes.py

Anton G. report at bugs.python.org
Thu Jul 22 15:50:28 EDT 2021


New submission from Anton G. <anton.gruebel at googlemail.com>:

When I did some work on typeshed I found some weird syntax in pipes.py.

if type(cmd) is not type(''):

which can easily be changed to

if not isinstance(cmd, str):

There are two occurrences and I will directly create the PR :)

----------
components: Library (Lib)
messages: 397995
nosy: anton.gruebel
priority: normal
severity: normal
status: open
title: Optimize type check in pipes.py
type: performance

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44711>
_______________________________________


More information about the Python-bugs-list mailing list