Skip to Content
मेन्यू
This question has been flagged
1 Reply
4647 Views

Hello all,

I don't understand how works this python line because of the in, the and and the or.  Can you explain please?


default_amount = invoice.type in ('out_refund', 'in_refund') and -invoice.residual or invoice.residual


Thanks

Avatar
Discard
Author Best Answer

Ok, I have found it there : 

http://python.developpez.com/cours/DiveIntoPython/php/frdiveintopython/power_of_introspection/and_or.php


At the point 4.6.1


Avatar
Discard
Related Posts Replies Views Activity
0
मार्च 15
5159
3
मार्च 25
18196
0
जून 24
1508
2
फ़र॰ 21
6103
0
जन॰ 24
8672