Skip to content

Commit

Permalink
simplified long string returns in doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislit committed Jan 28, 2020
1 parent b026e7d commit cd75b30
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions abydos/phonetic/_beider_morse.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,28 +939,30 @@ def encode(self, word: str) -> str:
Examples
--------
>>> pe = BeiderMorse()
>>> pe.encode('Christopher')
'xrQstopir,xrQstYpir,xristopir,xristYpir,xrQstofir,xrQstYfir,\
xristofir,xristYfir,xristopi,xritopir,xritopi,xristofi,xritofir,xritofi,\
tzristopir,tzristofir,zristopir,zristopi,zritopir,zritopi,zristofir,zristofi,\
zritofir,zritofi'
>>> pe.encode('Christopher').split(',')
['xrQstopir', 'xrQstYpir', 'xristopir', 'xristYpir', 'xrQstofir',
'xrQstYfir', 'xristofir', 'xristYfir', 'xristopi', 'xritopir',
'xritopi', 'xristofi', 'xritofir', 'xritofi', 'tzristopir',
'tzristofir', 'zristopir', 'zristopi', 'zritopir', 'zritopi',
'zristofir', 'zristofi', 'zritofir', 'zritofi']
>>> pe.encode('Niall')
'nial,niol'
>>> pe.encode('Smith')
'zmit'
>>> pe.encode('Schmidt')
'zmit,stzmit'
>>> BeiderMorse(language_arg='German').encode('Christopher')
'xrQstopir,xrQstYpir,xristopir,xristYpir,xrQstofir,xrQstYfir,\
xristofir,xristYfir'
>>> BeiderMorse(language_arg='English').encode('Christopher')
'tzristofir,tzrQstofir,tzristafir,tzrQstafir,xristofir,xrQstofir,\
xristafir,xrQstafir'
>>> BeiderMorse(language_arg='German').encode('Christopher').split(',')
['xrQstopir', 'xrQstYpir', 'xristopir', 'xristYpir', 'xrQstofir',
'xrQstYfir', 'xristofir', 'xristYfir']
>>> BeiderMorse(language_arg='English').encode(
... 'Christopher').split(',')
['tzristofir', 'tzrQstofir', 'tzristafir', 'tzrQstafir', 'xristofir',
'xrQstofir', 'xristafir', 'xrQstafir']
>>> BeiderMorse(language_arg='German',
... name_mode='ash').encode('Christopher')
'xrQstopir,xrQstYpir,xristopir,xristYpir,xrQstofir,xrQstYfir,\
xristofir,xristYfir'
... name_mode='ash').encode('Christopher').split(',')
['xrQstopir', 'xrQstYpir', 'xristopir', 'xristYpir', 'xrQstofir',
'xrQstYfir', 'xristofir', 'xristYfir']
>>> BeiderMorse(language_arg='German',
... match_mode='exact').encode('Christopher')
Expand Down

0 comments on commit cd75b30

Please sign in to comment.