aboutsummaryrefslogtreecommitdiffhomepage
path: root/compile.sh
diff options
context:
space:
mode:
authorGravatar Jon Brandvein <brandjon@google.com>2017-01-13 17:46:29 +0000
committerGravatar Vladimir Moskva <vladmos@google.com>2017-01-16 13:43:23 +0000
commitb3d0bdd0e0c2f0d766a7fd8e8428ab5b5a43ad48 (patch)
tree1b7d7f64ddb6ad54cce0553303da71c7699e3c79 /compile.sh
parentae0ad666322855eb3641dc107964fc90ec80f042 (diff)
Add a to_list() method to depsets
This is the preferred way to test for membership in, or iterate over, depsets (aka nested sets, aka plain old set()). The old way of doing membership tests or iterations over the raw depset itself is deprecated and may be removed in the future. Note that membership testing in a depset was always an O(n) operation, perhaps contrary to the user's expectation, so using to_list() does not make things asymptotically worse. It just makes things more explicit. RELNOTES: To iterate over or test for membership in a set, prefer using the new to_list() method. E.g., "for x in myset.to_list():", or "print(x in myset.to_list())". Iteration/membership-test on the raw set itself is deprecated. -- PiperOrigin-RevId: 144452510 MOS_MIGRATED_REVID=144452510
Diffstat (limited to 'compile.sh')
0 files changed, 0 insertions, 0 deletions