capture special case early instead of failing

This commit is contained in:
Philip Eisenlohr 2021-08-16 13:24:34 -04:00 committed by Martin Diehl
parent b754617c76
commit 728e50f79e
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)',