For example, I have an object x that might be None or a string representation of a float. I want to do the following:
do_stuff_with(float(x) if x else None)
Except without having to type x twice, as with Ruby’s andand library:
require 'andand'
do_stuff_with(x.andand.to_f)
We don’t have one of those but it isn’t hard to roll your own: