match case
Posted: Tue Feb 08, 2022 4:57 am
Does the SPS Python support the match case statement?
Code: Select all
propType = Context.Properties[0].Type
propStateCd = Context.Properties[0].Address.State.Code
#Set the Endorsement Code that will be Assigned
match str(propType.Description.lower()):
case 'pud':
# PUD
if propStateCd == 'PA':
endCD = 'TIRBOP_820_07'
else:
endCD = 'ALTA_5_2010'
case 'condo':
#CONDO
if propStateCd == 'PA':
endCD = 'TIRBOP_810_07'
else:
endCD = 'ALTA_4_2010'
case _:
return # No Code so No Need to Add.