Bare asterisk fix breaks docstrings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
awkwardduet |
Fix Released
|
Low
|
Denis Zawada |
Bug Description
It works but breaks docstrings:
#!/usr/bin/env python3
def func(obligatory, *, other=' ', arguments=''):
"""
Returns ponies for the given `obligatory` argument. Optional `other`
`arguments` may be passed."""
return "{} ponies.
print(func.__doc__)
print()
print(func("Pink", arguments="Not yours."))
is converted to
#!/usr/bin/env python
def func(obligatory, **_3to2kwargs):
if 'arguments' in _3to2kwargs: arguments = _3to2kwargs[
else: arguments = u''
if 'other' in _3to2kwargs: other = _3to2kwargs[
else: other = u' '
u""
Returns ponies for the given `obligatory` argument. Optional `other`
`arguments` may be passed."""
return u"{} ponies.
print func.__doc__
print
print func(u"Pink", arguments=u"Not yours.")
Now func.__doc__ is None.
(Inherited from https:/
Changed in awkwardduet: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
Changed in awkwardduet: | |
importance: | Wishlist → Low |
Changed in awkwardduet: | |
status: | Confirmed → Triaged |
milestone: | none → 1.1a2 |
Changed in awkwardduet: | |
status: | Triaged → Fix Committed |
assignee: | nobody → Denis Zawada (ohdeno) |
Changed in awkwardduet: | |
status: | Fix Committed → Fix Released |