mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix bug introduced at r54854 to mass replace string fcns with methods :-)
This commit is contained in:
parent
0e6012cbf3
commit
4d9620a687
1 changed files with 1 additions and 4 deletions
|
@ -257,19 +257,16 @@ def _parse_sequence(sequence):
|
||||||
"""
|
"""
|
||||||
if not sequence or sequence[0] != '<' or sequence[-1] != '>':
|
if not sequence or sequence[0] != '<' or sequence[-1] != '>':
|
||||||
return None
|
return None
|
||||||
words = '-'.split(sequence[1:-1])
|
words = sequence[1:-1].split('-')
|
||||||
|
|
||||||
modifiers = 0
|
modifiers = 0
|
||||||
while words and words[0] in _modifier_names:
|
while words and words[0] in _modifier_names:
|
||||||
modifiers |= 1 << _modifier_names[words[0]]
|
modifiers |= 1 << _modifier_names[words[0]]
|
||||||
del words[0]
|
del words[0]
|
||||||
|
|
||||||
if words and words[0] in _type_names:
|
if words and words[0] in _type_names:
|
||||||
type = _type_names[words[0]]
|
type = _type_names[words[0]]
|
||||||
del words[0]
|
del words[0]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if _binder_classes[type] is _SimpleBinder:
|
if _binder_classes[type] is _SimpleBinder:
|
||||||
if modifiers or words:
|
if modifiers or words:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue