Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4678 Prikazi

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
Opusti
Avtor 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
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
mar. 15
5167
3
mar. 25
18252
0
jun. 24
1539
2
feb. 21
6154
0
jan. 24
8687