79767780

Date: 2025-09-17 20:23:20
Score: 1
Natty:
Report link

Yes, its in pynvl-lib.

from pynvl import nvl, coalesce

print(nvl(None, 5)) # 5

print(nvl("hello", 99)) # 'hello'

#Coalesce is there too:

port_address = None
ip_address = None
mac_address = "A1:B2:C3:D4:E5:F6"
print(coalesce(port_address, ip_address, mac_address)) # "A1:B2:C3:D4:E5:F6"

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Shane Wilson