Robert Wright <madman....@hotmail.co.uk> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35123> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com