Feature Requests: Browse | Submit New | Admin

[#18919] Positional parameters vs keyword parameters

Date:
2008-03-18 18:59
Priority:
3
Submitted By:
Carlos Paramio (carlosparamio)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Positional parameters vs keyword parameters

Detailed description
I find that some public methods with more than 2 parameters would be easier to use if they were defined with non-positional
parameters. One example is the get_photos method:

def get_photos(pids = nil, subj_id = nil,  aid = nil)

This is hard to remember, and forces the developer to use method calls like this:

# Obtain all the photos on one album
session.get_photos(nil, nil, aid)

when it could be:

session.get_photos(:aid => aid)

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item