Page 1 of 1

match case

Posted: Tue Feb 08, 2022 4:57 am
by B_Hinote
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.

Re: match case

Posted: Wed Feb 09, 2022 2:23 pm
by BobRichards
No. Our Python implementation version is 2.7. The match case structure is targeted for Python 3.10+. There are no plans that I am aware of to change our version.