[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-16 Thread Greg Darke
Change by Greg Darke : -- resolution: -> fixed ___ Python tracker <https://bugs.python.org/issue43497> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-15 Thread Greg Darke
Greg Darke added the comment: I would argue that there is none (especially if it is tuple/something that is always true) -- thus why I would assume that Python would provide a warning. This bug comes from a discussion I was having with someone earlier today where they mentioned that it

[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-15 Thread Greg Darke
Change by Greg Darke : -- keywords: +patch pull_requests: +23629 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24867 ___ Python tracker <https://bugs.python.org/issu

[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-15 Thread Greg Darke
New submission from Greg Darke : The following block of code does not produce a SyntaxWarning in python 3.7 and above (it does produce a warning in python 3.6 and below): ``` assert(False, 'msg') ``` If the tuple is not a constant (for example `(x, 'msg')`), then a warnin

[issue3889] Demo/parser/unparse.py

2008-09-17 Thread Greg Darke
New submission from Greg Darke <[EMAIL PROTECTED]>: When the unparse demo is run on a file containing a 'from x import y' statement, it incorrectly outputs it as 'from x import , y'. The attached patch fixes this. -- components: Demos and Tools files: fix_impo