mirror of https://github.com/python/cpython
Issue #20300: Fix exception when setting conversion class member "default"
to None.
This commit is contained in:
parent
b7ccb20423
commit
c4fe092bc3
|
@ -3446,8 +3446,10 @@ class DSLParser:
|
||||||
a = [p.name]
|
a = [p.name]
|
||||||
if p.converter.is_optional():
|
if p.converter.is_optional():
|
||||||
a.append('=')
|
a.append('=')
|
||||||
value = p.converter.default
|
value = p.converter.py_default
|
||||||
a.append(p.converter.py_default)
|
if not value:
|
||||||
|
value = str(p.converter.default)
|
||||||
|
a.append(value)
|
||||||
s = fix_right_bracket_count(p.right_bracket_count)
|
s = fix_right_bracket_count(p.right_bracket_count)
|
||||||
s += "".join(a)
|
s += "".join(a)
|
||||||
if add_comma:
|
if add_comma:
|
||||||
|
|
Loading…
Reference in New Issue