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 madman bob
Recipients eric.smith, madman bob, steven.daprano, vstinner
Date 2018-11-07.11:48:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541591313.96.0.788709270274.issue35123@psf.upfronthosting.co.za>
In-reply-to
Content
Perhaps there's confusion over what I mean by "style guide". I'd happily take Steven's message *as* the style guide. Or, at the very least, the clarification that sentinels are to be thought of as constants.

It's one of those things that's obvious once mentioned, but might not be thought of when you're using them.

Though Eric does raise an interesting point about C sentinels. Something like:

kwargs = {}

if mode is not _MISSING:
  kwargs.update(mode=mode)

return open(name, "foo", **kwargs)

would work a bit better with multiple arguments, but it's still not great.
History
Date User Action Args
2018-11-07 11:48:34madman bobsetrecipients: + madman bob, vstinner, eric.smith, steven.daprano
2018-11-07 11:48:33madman bobsetmessageid: <1541591313.96.0.788709270274.issue35123@psf.upfronthosting.co.za>
2018-11-07 11:48:33madman boblinkissue35123 messages
2018-11-07 11:48:33madman bobcreate