You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
327 B
Python
19 lines
327 B
Python
"""EditorConfig Python2/Python3/Jython compatibility utilities"""
|
|
import sys
|
|
import types
|
|
|
|
__all__ = ['slice', 'u']
|
|
|
|
|
|
if sys.version_info[0] == 2:
|
|
slice = types.SliceType
|
|
else:
|
|
slice = slice
|
|
|
|
|
|
if sys.version_info[0] == 2:
|
|
import codecs
|
|
u = lambda s: codecs.unicode_escape_decode(s)[0]
|
|
else:
|
|
u = lambda s: s
|