left = dol + 1
while left < n and (string[left].isalnum() or string[left] in '-_'):
left += 1
- prop = string[dol + 1:left].replace('-', '_')
+ prop = string[dol + 1:left]
## If we came up empty, report an error.
if prop == '':
"invalid placeholder (empty name) in `%s'" % string
## Extend the path: we're going to do a recursive expansion.
+ prop = prop.replace('-', '_')
path.append(prop)
## Report a cycle if we found one.