how to check completeness of a form

Jeff Epler jepler at unpythonic.net
Sun May 4 17:51:20 EDT 2003


def is_complete(f):
	for field in all_fields:
		if not has_field(f, field): return 0
	return 1

def process_form_if_complete(f):
	if is_complete(f):
		really_process_form(f)
	else:
		complain()

f = get_form()
process_form_if_complete(f)

Jeff





More information about the Python-list mailing list