python: Add __bool__ helpers in addition to __nonzero__
authorAndreas Sandberg <andreas.sandberg@arm.com>
Sat, 26 Jan 2019 10:51:29 +0000 (10:51 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 20 Feb 2019 18:27:10 +0000 (18:27 +0000)
commit4fa56fe2f8618f5fbc47ec21ac033d5e7ac2790d
tree193b59ca73e7c7a512ec7517320cd8cda57e533d
parentd07cceb13e13cfe806c37527e602cde0789ea8c3
python: Add __bool__ helpers in addition to __nonzero__

Python 3 uses __bool__ instead of __nonzero__ when performing a
Boolean comparison.

Change-Id: I85185bbe136ecae67346fa23569e24edd7329222
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15996
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
src/python/m5/params.py
src/python/m5/util/smartdict.py