cf.CfDict.has_key

CfDict.has_key(key)[source]

Return true if and only if the dictionary contains the given key.

Parameters :
key : hashable object

The key.

Returns :

out : bool

Examples

>>> d.keys()
['key1', 3, ('a', 1)]
>>> d.has_key(3)
True
>>> d.has_key('key9')
False

Previous topic

cf.CfDict.get_keys

Next topic

cf.CfDict.items

This Page