# HG changeset patch
# User Lukas Lansky <lansky@kam.mff.cuni.cz>
# Date 1323736375 0
# Node ID 7a3c18f6ed26679a9f64081573ac85e06faee475
# Parent 9e29a3d84c48c399daaf3920bcb8b17273a0e876
Trac 10953: empty graph is regular
diff git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
a

b


8845  8845  
8846  8846  EXAMPLES:: 
8847  8847  
 8848  sage: Graph().is_regular() 
 8849  True 
8848  8850  sage: G = graphs.HoffmanSingletonGraph() 
8849  8851  sage: G.is_regular() 
8850  8852  True 
… 
… 

8863  8865  sage: graphs.HouseGraph().is_regular() 
8864  8866  False 
8865  8867  """ 
 8868  if len(self) == 0: 
 8869  return True 
 8870  
8866  8871  deg_it = self.degree_iterator() 
8867  8872  if k is None: 
8868  8873  k = deg_it.next() 