mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
* cleanup
This commit is contained in:
@@ -34,7 +34,7 @@ class Token(object):
|
|||||||
# Backward compatibility
|
# Backward compatibility
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
# Builds the same structure as tuple used to have
|
# Builds the same structure as tuple used to have
|
||||||
if key == 0:
|
if key == 0:
|
||||||
return self.token_type
|
return self.token_type
|
||||||
elif key == 1:
|
elif key == 1:
|
||||||
return self.token
|
return self.token
|
||||||
@@ -46,7 +46,7 @@ class Token(object):
|
|||||||
# Backward compatibility
|
# Backward compatibility
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
# setitem analogous to
|
# setitem analogous to
|
||||||
if key == 0:
|
if key == 0:
|
||||||
self.token_type = value
|
self.token_type = value
|
||||||
elif key == 1:
|
elif key == 1:
|
||||||
self.token = value
|
self.token = value
|
||||||
|
|||||||
Reference in New Issue
Block a user