capture special case early instead of failing

This commit is contained in:
Philip Eisenlohr 2021-08-16 13:24:34 -04:00
parent 8759d82e87
commit d2bd6e16ca
1 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,8 @@ def shapeshifter(fro,to,mode='left',keep_ones=False):
"""
if not len(fro) and not len(to): return ()
beg = dict(left ='(^.*\\b)',
right='(^.*?\\b)')
sep = dict(left ='(.*\\b)',