News for hackers. Stuff that matters.
Re:Notset: A Do-Not-Care value for Python by DasIch on Saturday November 10, 2012 @06:17PM (#4768107)
I'm impressed by how much effort one can put into something that is effectively nothing else than:

    NotSet = type("NotSet", (object, ), dict(__repr__=lambda self: "NotSet"))
There is no amazing concept, no new idea or even anything remotely interesting at all here. This is but a side-effect of a type system that encourages the usage of None in this way and the fact that None is generally used to mean undefined in keyword arguments.

Why would anyone consider this notable, useful or even important enough to warrant an upvote?

Re:Notset: A Do-Not-Care value for Python by shmeedogg on Saturday November 10, 2012 @06:34PM (#4768145)
The implementation here is just a suggestion, and trust me, it wasn't much effort ;-)

The aspect that interests me is that this is a problem that crops up occasionally in different Python projects and there doesn't seem to be a recognized best-practice for addressing it.

(The `kwargs` approach seems like the most common but has all the downsides I mentioned.)