خرید بک لینک

Vote count: 0

Sometimes for readability it's convenient to have

a = b if c else d

Why is this not available for other similar functions such as try, except

a = b try c except d

Some examples of usage would be

# if a and b contain np.nan values
equal = True try np.testing.assert_equal(a, b) except False

# error handling for simple func call
res = z try proc1(x,y) except False

asked 46 secs ago

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

صفحه بندی