Bugs item #1755097, was opened at 2007-07-16 13:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1755097&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ilya Sandler (isandler)
Assigned to: Nobody/Anonymous (nobody)
Summary: document default values for sort parameters
Initial Comment:
sort() and sorted() accept several optional parameters.
Should default values for those optional parameters be documented? (E.g. I
think both for sort and key None is the default value)
Explicitly documented defaults are needed, e.g. if you need to write a wrapper.
def sortWrapper( data, userKey=None)
#do something
data.sort(key=userKey)
(if you don't know the default values, you have to write something ugly like:
def sortWrapper( data, userKey=None)
#do something
if userKey is None:
data.sort()
else:
data.sort(userKey)
Or am I missing something?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1755097&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com