def is_single(doctype):
	try:
		return frappe.db.get_value("DocType", doctype, "issingle")
	except __HOLE__:
		raise Exception, 'Cannot determine whether %s is single' % doctype
dataset/ETHPy150Open frappe/frappe/frappe/model/meta.py/is_single