]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use 'in' instead of 'has_key()' for testing dictionary membership.
authorrodrigc <rodrigc@FreeBSD.org>
Wed, 18 Nov 2015 23:32:29 +0000 (23:32 +0000)
committerrodrigc <rodrigc@FreeBSD.org>
Wed, 18 Nov 2015 23:32:29 +0000 (23:32 +0000)
commit0faa3804ef530c877c8f6dfaa3a75937bd5cb1c1
tree5a5e32204f4c07db711039f190bb5c152599f8fd
parentf133998d4f5495d55375e081bb5ce826f1f43e73
Use 'in' instead of 'has_key()' for testing dictionary membership.

In PEP 0290, has_key() was deprecated in Python 2.2 and higher:
https://www.python.org/dev/peps/pep-0290/#testing-dictionary-membership
https://docs.python.org/2.2/whatsnew/node4.html

In Python 3, dict.has_key() was removed:
https://docs.python.org/3.0/whatsnew/3.0.html#builtins
tools/sched/schedgraph.py
tools/tools/shlib-compat/shlib-compat.py