def _build_gecos(gecos_dict):
 return '{0},{1},{2},{3}'.format(gecos_dict.get('fullname', ''), gecos_dict.get('roomnumber', ''), gecos_dict.get('workphone', ''), gecos_dict.get('homephone', ''))

def _build_gecos ( gecos_dict ) : return '{0},{1},{2},{3}' . format ( gecos_dict . get ( 'fullname' , '' ) , gecos_dict . get ( 'roomnumber' , '' ) , gecos_dict . get ( 'workphone' , '' ) , gecos_dict . get ( 'homephone' , '' ) )
accepts a dictionary entry containing gecos field names and their values .