خرید بک لینک

Vote count: 0

e.g. pictures this:

def some_operation(var) -> (bool, String):
    retu False, "This is a test"


success, error_message = someOperation("aVar")
if not success:
    print(error_message)

I feel there mist be a way to do something in one line the prints msg if err == false. If there were defined you could do

success or print(error_message)

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 2 فروردين 1395 ساعت: 12:18

صفحه بندی