News for hackers. Stuff that matters.
Re:PEP 505: Bringing None-Aware Operators to Python by thijsvandien on Sunday August 12, 2018 @11:03AM (#17744634)
If you really need it to be short you could write:

  (libpaths or '').split(":")
I would be in favor of just using an if-else though, if the None case is special, to emphasize that. If it isn't, then you shouldn't be writing this in the first place and just make sure that libpaths is always a string; otherwise you'd be expressing the same state in two ways.
Re:PEP 505: Bringing None-Aware Operators to Python by Silhouette on Sunday August 12, 2018 @11:57AM (#17744900)

    (libpaths or '').split(":")
This isn't quite the same: if libpaths is None, the above will evaluate to [''], while the original evaluated to [].

Of course, the original code was rather awkward itself, redefining the same variable to have a completely different meaning, as well as potentially involving four different representations of nothingness. I'm not sure the syntax is the biggest problem here...