[New-bugs-announce] [issue20302] Argument Clinic: meaningful names for group flags

Serhiy Storchaka report at bugs.python.org
Sun Jan 19 14:11:53 CET 2014


New submission from Serhiy Storchaka:

Currently flags for optional groups are named as group_left_N and  group_right_N. It will be better if they have names use_param, use_param1_param2, etc. E.g. following declaration:

/*[clinic input]
curses.window.addstr

    self: self(type="PyCursesWindowObject *")
    [
    y: int
        Y-coordinate.
    x: int
        X-coordinate.
    ]

    str: object
        String to add.

    [
    attr: long
        Attributes for the character.
    ]
    /

[clinic start generated code]*/

Should produce signature:

static PyObject *
curses_window_addstr_impl(PyCursesWindowObject *self, int use_x_y, int y, int x, PyObject *str, int use_attr, long attr)

(Existing non-clinicalized code use use_xy and use_attr flags).
This will make the code a little cleaner.

----------
components: Build, Demos and Tools
messages: 208476
nosy: larry, serhiy.storchaka
priority: low
severity: normal
stage: needs patch
status: open
title: Argument Clinic: meaningful names for group flags
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20302>
_______________________________________


More information about the New-bugs-announce mailing list