Issue 20299: Argument Clinic CConverter.init() overrides c_default and py_default (original) (raw)

Issue20299

Created on 2014-01-19 05:39 by rmsr, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ac_overwritten_defaults.patch rmsr,2014-01-19 05:39 don't overwrite c_default and py_default if not supplied to __init__ review
Messages (4)
msg208447 - (view) Author: Ryan Smith-Roberts (rmsr) * Date: 2014-01-19 05:39
The docs indicate that you can do: class foo_converter(CConverter): ... c_default = 'bar()' py_default = 'Bar' except that CConverter.__init__() unconditionally overwrites these values. Patch attached.
msg208449 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-01-19 05:54
New changeset 8f11493cf727 by Larry Hastings in branch 'default': Issue #20299: Argument Clinic custom converters may now change the default http://hg.python.org/cpython/rev/8f11493cf727
msg208450 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-19 05:55
Checked in. Thanks for the report, and the patch! I worked so quickly, I just realized, I didn't credit you in the NEWS file for the fix. Do you want me to fix that?
msg208452 - (view) Author: Ryan Smith-Roberts (rmsr) * Date: 2014-01-19 05:59
No, I'm happy. It isn't really news anyway, since the patch just brings reality inline with the docs :).
History
Date User Action Args
2022-04-11 14:57:57 admin set github: 64498
2014-01-19 05:59:46 rmsr set messages: +
2014-01-19 05:55:35 larry set status: open -> closedassignee: larryresolution: fixedstage: resolved
2014-01-19 05:55:23 larry set messages: +
2014-01-19 05:54:38 python-dev set nosy: + python-devmessages: +
2014-01-19 05:47:48 rmsr set nosy: + nikratio
2014-01-19 05:39:40 rmsr create