This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients docs@python, eli.bendersky, eric.araujo, eric.smith, ezio.melotti, georg.brandl
Date 2011-11-12.10:53:47
SpamBayes Score 0.00017279237
Marked as misclassified No
Message-id <1321095228.68.0.498192197786.issue13386@psf.upfronthosting.co.za>
In-reply-to
Content
To your last point, I think it's important to specify the default value placeholder (basically a sentinel) in the documentation. For example, if a function takes -1 to mean "all occurrences", then the caller needs to know how what value to pass in in order to let the function compute the value. This is especially true if it's cheaper for the function to compute the value instead of the caller.

I've run into this problem before, where I wanted to pass in some sentinel value and I had to read the source to figure out what it was. I think the function was in the standard library, but now I can't recall what it was.
History
Date User Action Args
2011-11-12 10:53:48eric.smithsetrecipients: + eric.smith, georg.brandl, ezio.melotti, eric.araujo, eli.bendersky, docs@python
2011-11-12 10:53:48eric.smithsetmessageid: <1321095228.68.0.498192197786.issue13386@psf.upfronthosting.co.za>
2011-11-12 10:53:48eric.smithlinkissue13386 messages
2011-11-12 10:53:47eric.smithcreate