pymensago/contact.py
def unflatten(d: dict) -> RetVal:
	'''Unflattens a dictionary from the format described for flatten()'''
	if not len(d):
		return RetVal().set_value('value', dict())
	
	if not isinstance(d, dict):
		return RetVal(ErrBadType)
	
	unflattened = dict()
	for k,v in d.items():
		status = unflatten_field(unflattened, k, v)
		if status.error():
			return status

	return RetVal().set_value('value', unflattened)
Unflattens a dictionary from the format described for flatten()
Unflattens a dictionary from the format described for flatten()
Unflattens a dictionary from the format described for flatten ()
def unflatten(d: dict) -> RetVal:
	if not len(d):
		return RetVal().set_value('value', dict())
	if not isinstance(d, dict):
		return RetVal(ErrBadType)
	unflattened = dict()
	for k,v in d.items():
		status = unflatten_field(unflattened, k, v)
		if status.error():
			return status
	return RetVal().set_value('value', unflattened)
def unflatten ( d : dict ) -> RetVal : if not len ( d ) : return RetVal ( ) . set_value ( 'value' , dict ( ) ) if not isinstance ( d , dict ) : return RetVal ( ErrBadType ) unflattened = dict ( ) for k , v in d . items ( ) : status = unflatten_field ( unflattened , k , v ) if status . error ( ) : return status return RetVal ( ) . set_value ( 'value' , unflattened )
Unflattens a dictionary from the format described for flatten()
Unflattens a dictionary from the format described for flatten ()
'''Unflattens a dictionary from the format described for flatten()'''
d
dict