Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function(**dict) does not accept comma after dict (inside parenthese) #68788

Closed
gst mannequin opened this issue Jul 9, 2015 · 2 comments
Closed

function(**dict) does not accept comma after dict (inside parenthese) #68788

gst mannequin opened this issue Jul 9, 2015 · 2 comments

Comments

@gst
Copy link
Mannequin

gst mannequin commented Jul 9, 2015

BPO 24600
Nosy @bitdancer, @gst
Superseder
  • bpo-9232: Allow trailing comma in any function argument list.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-07-09.21:01:09.688>
    created_at = <Date 2015-07-09.20:30:20.999>
    labels = []
    title = 'function(**dict) does not accept comma after dict (inside parenthese)'
    updated_at = <Date 2015-07-09.21:01:09.686>
    user = 'https://github.com/gst'

    bugs.python.org fields:

    activity = <Date 2015-07-09.21:01:09.686>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-07-09.21:01:09.688>
    closer = 'r.david.murray'
    components = []
    creation = <Date 2015-07-09.20:30:20.999>
    creator = 'gstarck'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 24600
    keywords = []
    message_count = 2.0
    messages = ['246525', '246527']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'gstarck']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '9232'
    type = None
    url = 'https://bugs.python.org/issue24600'
    versions = ['Python 3.4']

    @gst
    Copy link
    Mannequin Author

    gst mannequin commented Jul 9, 2015

    Consider following:

    Python 3.4.0 (default, Jun 19 2015, 14:20:21)
    [GCC 4.8.2] on linux

    >> def f(**kw): pass

    >> f(a=1 , )
    >> # ok

    >> f(**{'a': 1} )
    >> # ok

    >> # but :

    >>> f(**{'a': 1} , )
    SyntaxError: invalid syntax
    >>> 

    shouldn't the last form be also allowed as is the first one ??

    if it is: Could I personnaly handle this fix ? I'd be very proud to bring (even such a low impact problem) my own stone to Python :)

    Kind regards.

    @bitdancer
    Copy link
    Member

    This is a duplicate of bpo-9232, which has a patch. The question is getting agreement to apply it...it sounds like your service in this regard could be bringing it up on python-ideas; please read that issue through and see if you agree.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant