summaryrefslogtreecommitdiffstats
path: root/Lib/token.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-05-17 16:55:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-05-17 16:55:59 (GMT)
commitea3eb88bcaef775c8f2bbe310053f9990a8c9ea7 (patch)
tree9461ae28e833a95a79cc4811df68435bf0e00fc3 /Lib/token.py
parent5cec9d2ae57da6fb5c424bb297ddb67902393b2d (diff)
downloadcpython-ea3eb88bcaef775c8f2bbe310053f9990a8c9ea7.zip
cpython-ea3eb88bcaef775c8f2bbe310053f9990a8c9ea7.tar.gz
cpython-ea3eb88bcaef775c8f2bbe310053f9990a8c9ea7.tar.bz2
Issue #9260: A finer-grained import lock.
Most of the import sequence now uses per-module locks rather than the global import lock, eliminating well-known issues with threads and imports.
Diffstat (limited to 'Lib/token.py')
-rwxr-xr-xLib/token.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/token.py b/Lib/token.py
index 6b5320d..31fae0a 100755
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -70,7 +70,7 @@ NT_OFFSET = 256
tok_name = {value: name
for name, value in globals().items()
- if isinstance(value, int)}
+ if isinstance(value, int) and not name.startswith('_')}
__all__.extend(tok_name.values())
def ISTERMINAL(x):