This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Probable typo in Arg Clinic's linear_format()
Type: Stage: resolved
Components: Argument Clinic Versions: Python 3.6, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: larry, martin.panter, python-dev, vstinner
Priority: normal Keywords:

Created on 2016-02-09 02:32 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg259908 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-09 02:32
The curly bracket separator is assigned to “curl”, but then the previous “curly” variable is tested:

name, curl, trailing = trailing.partition('}')
if not curly or name not in kwargs:

I presume the fix is to assign to “curly”, but I haven’t had a chance to figure out how to test it yet.
msg259912 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2016-02-09 04:12
Yeah, change "curl" to "curly".  If you commit the fix without a test case I'd forgive you.  Or I can do it if that makes you nervous.
msg260050 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-02-10 22:30
Go ahead.
msg260260 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-02-14 03:25
New changeset aec2eae8933e by Martin Panter in branch '3.5':
Issue #26316: Fix variable name typo in Argument Clinic

New changeset 6c122e4e1cb2 by Martin Panter in branch 'default':
Issue #26316: Merge Arg Clinic fix from 3.5
msg260262 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-14 04:35
I did look into testing, but I gave up. :) The test file doesn’t even import. I got the following error (without exception or traceback), cause by the line that reads “c = clinic.Clinic(language='C')”:

$ (cd Tools/clinic/ && ../../python
Destination does not exist: 'file'
[Exit 255]
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70504
2016-02-14 04:35:14martin.pantersetstatus: open -> closed
resolution: fixed
messages: + msg260262

stage: needs patch -> resolved
2016-02-14 03:25:47python-devsetnosy: + python-dev
messages: + msg260260
2016-02-12 19:30:11terry.reedysettitle: Probable typo in Arg Clinic’s linear_format() -> Probable typo in Arg Clinic's linear_format()
2016-02-10 22:30:22vstinnersetnosy: + vstinner
messages: + msg260050
2016-02-09 04:12:41larrysetmessages: + msg259912
2016-02-09 02:32:33martin.pantercreate