# HG changeset patch
# User Mike Hansen <mhansen@gmail.com>
# Date 1260899495 28800
# Node ID 3b79b0bbc70225a44af608cc13daef3e466592bd
# Parent 2b2706c80635d55d6273e48b90eed1fc93de2bc4
Minor fixes for #7294
diff git a/sage/graphs/graph.py b/sage/graphs/graph.py
a

b


10525  10525  Is there a perfect matching in an even cycle ? 
10526  10526  
10527  10527  sage: g = graphs.CycleGraph(6) 
10528   sage: bounds = lambda x : [1,1] 
10529   sage: m=g.degree_constrained_subgraph(bounds=bounds) # optional  requires GLPK or CBC 
10530   sage: m.size() 
 10528  sage: bounds = lambda x: [1,1] 
 10529  sage: m = g.degree_constrained_subgraph(bounds=bounds) # optional  requires GLPK or CBC 
 10530  sage: m.size() #optional 
10531  10531  3 
10532  10532  """ 
10533  10533  
… 
… 

10538  10538  
10539  10539  reorder = lambda x: (min(x[0],x[1]),max(x[0],x[1]),x[2]) 
10540  10540  
10541   if bounds == None: 
 10541  if bounds is None: 
10542  10542  raise ValueError,"The `bounds` keyword can not be equal to None" 
10543  10543  elif isinstance(bounds,dict): 
10544   f_bounds = lambda x : bounds[x] 
 10544  f_bounds = lambda x: bounds[x] 
10545  10545  else: 
10546  10546  f_bounds = bounds 
10547  10547  
10548  10548  
10549  10549  if self.weighted(): 
10550   weight = lambda x: x[2] if x[2] != None else 1 
 10550  weight = lambda x: x[2] if x[2] is not None else 1 
10551  10551  else: 
10552  10552  weight = lambda x: 1 
10553  10553  