Skip to content
Advertisement

Python equivalent for MySQL’s IFNULL

Is there a function in Python that checks if the returned value is None and if it is, allows you to set it to another value like the IFNULL function in MySQL?

Advertisement

Answer

Not really, since you can’t rebind arguments.

JavaScript

or

JavaScript
Advertisement