El 20/07/16 a les 17:11, Marko Randjelovic ha escrit:
Let us look at pyson expresson:
If(~Eval('end_date', None)
What is ~? Experimenting with Python interpreter, ~True is -2 and ~False
is -1. I thought ~ is for negation, but -1 and -2 are not boolean values
even in C they are 0 or >0.
In python ~ is the shourcut of Bitwise Inversion [1].
In PySON is the shourtcut of the Not operator: So your statement means:
> If(Not(Eval('end_date', None))
Which I think you will understand :)
[1]
https://docs.python.org/2/library/operator.html#mapping-operators-to-functions
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/c459b6c8-f66a-f17b-9bb9-9c453da3967c%40koolpi.com.