summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-02-08 21:45:06 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-02-08 21:45:06 (GMT)
commit15a3095d64e96d0fe7448270f2c5b0bf22f9c4e1 (patch)
treeda112b21f47896fd48d61ac70429cf5001d89f90 /Misc
parent896632ea6b2b03815ae948aea05972b4e51247ed (diff)
downloadcpython-15a3095d64e96d0fe7448270f2c5b0bf22f9c4e1.zip
cpython-15a3095d64e96d0fe7448270f2c5b0bf22f9c4e1.tar.gz
cpython-15a3095d64e96d0fe7448270f2c5b0bf22f9c4e1.tar.bz2
compiler: don't emit SyntaxWarning on const stmt
Issue #26204: the compiler doesn't emit SyntaxWarning warnings anymore when constant statements are ignored.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS7
1 files changed, 4 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index e1875c0..d60aeb6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,9 +10,10 @@ Release date: tba
Core and Builtins
-----------------
-- Issue #26204: The compiler now ignores constant statements (ex: "def f(): 1")
- and emit a SyntaxWarning warning. The warning is not emitted for string and
- ellipsis (...) statements.
+- Issue #26204: The compiler now ignores all constant statements: bytes, str,
+ int, float, complex, name constants (None, False, True), Ellipsis
+ and ast.Constant; not only str and int. For example, ``1.0`` is now ignored
+ in ``def f(): 1.0``.
- Issue #4806: Avoid masking the original TypeError exception when using star
(*) unpacking in function calls. Based on patch by Hagen Fürstenau and