PEP 802: Display Syntax for the Empty Set

I’d call it a feature if //Absent couldn’t be stored in variables or passed around as arguments. It keeps us away the should I return None or Absent dichotomy that JavaScript fell into with null vs undefined. I’d support a proposal for being able to write subprocess.run(["command", "--debug" if debug else /]) but definitely not if it meant that I’d also then have to start worrying about which placeholder a function expects or returns.

That said, if / means no value then I’d expect {/} be the same as {} and therefore become just another empty dict() literal so I’d call the / as placeholder for no value” and {/} means set() proposals incompatible rather than one being a generalisation of the other.

3 Likes