We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2dab743 commit 9c76426Copy full SHA for 9c76426
1 file changed
test/test_has_key.py
@@ -0,0 +1,26 @@
1
+#!/usr/bin/env python
2
+# encoding: utf-8
3
+
4
+"""
5
+@author: zhanghe
6
+@software: PyCharm
7
+@file: test_has_key.py
8
+@time: 2017/5/27 下午2:13
9
10
11
12
+a = {
13
+ 'foo': '1',
14
+ 'bar': '2',
15
+}
16
17
18
+def func():
19
+ print a.has_key('foo') # deprecated
20
+ print a.has_key('fob') # deprecated
21
+ print 'foo' in a
22
+ print 'fob' in a
23
24
25
+if __name__ == '__main__':
26
+ func()
0 commit comments