Project

General

Profile

Feature #16045

Calling functions with keyword arguments

Added by D1mon (Dim F) about 1 year ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:94142]

Description

Python:

def fn(a=1,b=2,c=3):
    print(a,b,c)

fn() # 1 2 3
fn(c=4) # 1 2 4

Ruby:

def fn(a=1, b=2, c=3)
  p a,b,c  
end

fn(c=4) # 4 2 3

A very convenient and necessary thing that you must add in Ruby!?

Also available in: Atom PDF