We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d95ca2b commit f7e4ea3Copy full SHA for f7e4ea3
resources/session01/session1.py
@@ -8,7 +8,7 @@ def get_constants(prefix):
8
)
9
10
# this example is more 'pythonic' for 2.7 and above (where dictionary
11
-# comprehensions exist)
+# comprehensions exist) It will not work in Python 2.6 or below.
12
def get_constants_27(prefix):
13
return {getattr(socket, n):n for n in dir(socket) if n.startswith(prefix)}
14
0 commit comments