match case

Questions about and code samples for automation process code snippets within Select.
Post Reply
B_Hinote
Posts: 57
Joined: Tue Jan 08, 2019 7:20 pm

match case

Post 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.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: match case

Post 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.
Bob Richards, Senior Software Developer, SoftPro
Post Reply