[issue35430] Lib/argparse.py uses `is` for string comparison

2018-12-06 Thread Roman Yurchak
Roman Yurchak added the comment: Thanks, Alexey and Serhiy! Looking at the code more closely I would agree. I guess changing the value of the suppress object to something else to avoid the warning, has a potential of breaking code that relies on the current functionality and is not worth

[issue35430] Lib/argparse.py uses `is` for string comparison

2018-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Alexey. This is a correct use of the 'is' operator. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35430] Lib/argparse.py uses `is` for string comparison

2018-12-06 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: argparse.SUPPRESS is an opaque value to be used by argparse clients. It could be anything, it just happens to be a string. So the code doesn't compare strings but checks whether a supplied object *is* the opaque value. I do not see any problem with this

[issue35430] Lib/argparse.py uses `is` for string comparison

2018-12-06 Thread Roman Yurchak
Change by Roman Yurchak : -- keywords: +patch pull_requests: +10241 stage: -> patch review ___ Python tracker ___ ___

[issue35430] Lib/argparse.py uses `is` for string comparison

2018-12-06 Thread Roman Yurchak
New submission from Roman Yurchak : Lib/argparse.py uses `is` for string comparison, ` 221:if self.heading is not SUPPRESS and self.heading is not None: 247:if text is not SUPPRESS and text is not None: 251:if usage is not SUPPRESS: 256:if action.help is not