Alternatives for checking if something is not None in Python
I thought the readme on dry-python/return did a good job of explaining the usage of the Maybe type.
The key to understanding Maybe is that it represents computations which might &quot;go wrong&quot; by not returning a value.
The bind method (bind_optional) in this library allows you to write code without having to worry about the result of the computation at any intermediate step, it handles the case where one of the computations returns None.
In the code you use to demonstrate the conditionals, you still have to handle the cases of None via an if statement, the use of if not None vs if Some isn't relevant. As a hypothetical consider a computation with many level of optional results from computation, you'd still have to implement the same level of nesting.
In the example from the documentation
user: Optional[User]

# Type hint here is optional, it only helps the reader here:
discount_program: Maybe['DiscountProgram'] = Maybe.from_optional(
    user,
).bind_optional(  # This won't be called if `user is None`
    lambda real_user: real_user.get_balance(),
).bind_optional(  # This won't be called if `real_user.get_balance()` is None
    lambda balance: balance.credit_amount(),
).bind_optional(  # And so on!
    lambda credit: choose_discount(credit) if credit &gt; 0 else None,
)

the comments in the code say the same. You can imagine a library using a symbolic function name &gt;&gt;= with infix operators allowing the above code to be rewritten as

credit = user &gt;&gt;= (lambda real_user: real_user.get_balance())
              &gt;&gt;= (lambda balance: balance.credit_amount()) 
              &gt;&gt;= (lambda credit: choose_discount(credit) if credit &gt; 0 else None)


IMO, you approach to utilizing getattr is more akin to programming in a &quot;duck typing&quot; style than functional.
I used the haskell wiki's description of the Maybe monad if you want to dig in further.