summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-06-14 16:20:59 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-06-14 16:20:59 +0300
commitbdcde1adf8da7d7671ef87587ec9aab486fe3976 (patch)
tree3d28471ea9d75a0bfd9348b7fb319bad55489eb6 /ChangeLog
parentc0beaaca94b6c4d7c9829c08232713787730f332 (diff)
downloadastroid-bdcde1adf8da7d7671ef87587ec9aab486fe3976.tar.gz
Add a new method to the AST nodes, 'bool_value'.
It is used to deduce the value of a node when used in a boolean context, which is useful for both inference, as well as for data flow analysis, where we are interested in what branches will be followed when the program will be executed. `bool_value` returns True, False or YES, if the node's boolean value can't be deduced. The method is used when inferring the unary operand `not`. Thus, `not something` will result in calling `something.bool_value` and negating the result, if it is a boolean.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog9
1 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bbe81d3..41f15f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,15 @@ Change log for the astroid package (used to be astng)
We are also exposing a new method for UnaryOps, called `type_errors`,
which returns a list of UnaryOperationsError.
+ * A new method was added to the AST nodes, 'bool_value'. It is used to deduce
+ the value of a node when used in a boolean context, which is useful
+ for both inference, as well as for data flow analysis, where we are interested
+ in what branches will be followed when the program will be executed.
+ `bool_value` returns True, False or YES, if the node's boolean value can't
+ be deduced. The method is used when inferring the unary operand `not`.
+ Thus, `not something` will result in calling `something.bool_value` and
+ negating the result, if it is a boolean.
+
2015-03-14 -- 1.3.6