python-gedcom icon indicating copy to clipboard operation
python-gedcom copied to clipboard

Suffixes and get_name

Open lilaconlee opened this issue 6 years ago • 1 comments

Any recommendations for handling suffixes in names? Looks like the parser is just splitting on /, but I could be missing something.

Currently the following names both return Jane and Lane:

1 NAME Jane /Lane/ 
1 NAME Jane /Lane/ Jr 

lilaconlee avatar Jun 07 '19 17:06 lilaconlee

If you're really wanting to get this, you could do something like this (if you don't want to change the source code). name_element would have to be an element with the NAME tag. There are a few ways you could get this:

name_element.get_value().split('/')[2].strip()

I would say it would be best to just make a get_suffix() method based on get_name(). It would basically be the same but you'd just want to strip out the 3rd split element instead of the first two.

KeithPetro avatar Jun 07 '19 22:06 KeithPetro