[Python-checkins] peps: Note that comments are not allowed inside expressions.

eric.smith python-checkins at python.org
Sat Sep 5 23:07:30 CEST 2015


https://hg.python.org/peps/rev/a6e64585e4b8
changeset:   6041:a6e64585e4b8
user:        Eric V. Smith <eric at trueblade.com>
date:        Sat Sep 05 17:07:48 2015 -0400
summary:
  Note that comments are not allowed inside expressions.

files:
  pep-0498.txt |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/pep-0498.txt b/pep-0498.txt
--- a/pep-0498.txt
+++ b/pep-0498.txt
@@ -200,6 +200,9 @@
 brace. Doubled opening braces do not signify the start of an
 expression.
 
+Comments, using the ``'#'`` character, are not allowed inside the
+expression.
+
 Following the expression, an optional type conversion may be
 specified.  The allowed conversions are ``'!s'``, ``'!r'``, or
 ``'!a'``. These are treated the same as in ``str.format()``: ``'!s'``

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list