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]
|
||||
if p.converter.is_optional():
|
||||
a.append('=')
|
||||
value = p.converter.default
|
||||
a.append(p.converter.py_default)
|
||||
value = 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 += "".join(a)
|
||||
if add_comma:
|
||||
|
|
Loading…
Reference in New Issue