Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4635 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 15
5153
3
bře 25
18185
0
čvn 24
1495
2
úno 21
6076
0
led 24
8664