Commit ccd84b10 authored by Stefan Behnel's avatar Stefan Behnel

remove need for redundant class variable

parent f524e1e8
......@@ -2992,7 +2992,6 @@ class FormattedValueNode(ExprNode):
# format_spec JoinedStrNode or None Format string passed to __format__
subexprs = ['value', 'format_spec']
conversion_chars = 'sra'
type = py_object_type
is_temp = True
......
......@@ -1126,7 +1126,7 @@ def p_f_string_expr(s, unicode_value, pos, starting_index):
expr = p_testlist(scanner) # TODO is testlist right here?
# validate the conversion char
if conversion_char is not None and conversion_char not in ExprNodes.FormattedValueNode.conversion_chars:
if conversion_char is not None and not ExprNodes.FormattedValueNode.find_conversion_func(conversion_char):
s.error("invalid conversion character '%s'" % conversion_char)
# the format spec is itself treated like an f-string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment