# HG changeset patch
# User Xavier Caruso <xavier.caruso@normalesup.org>
# Date 1350908367 7200
# Node ID 20d203e49091630a94546573b3a12b5f5390c1b4
# Parent dc82ebdd68ec2977b5b66363ab2e36a8a315c61c
imported patch short_repr_morphisms.patch
diff git a/sage/categories/morphism.pyx b/sage/categories/morphism.pyx
a

b


60  60  s += "\n Defn: %s"%('\n '.join(self._repr_defn().split('\n'))) 
61  61  return s 
62  62  
 63  def _short_repr(self): 
 64  """ 
 65  Return a short string representation of this morphism. 
 66  EXAMPLES: 
 67  
 68  sage: R.<t> = ZZ[] 
 69  sage: f = R.hom([t+1]) 
 70  sage: f 
 71  Ring endomorphism of Univariate Polynomial Ring in t over Integer Ring 
 72  Defn: t > t + 1 
 73  sage: f._short_repr() 
 74  't > t + 1' 
 75  
 76  AUTHOR: 
 77  
 78   Xavier Caruso (20120629) 
 79  """ 
 80  d = self._repr_defn() 
 81  if d == "": 
 82  return self._repr_() 
 83  else: 
 84  return ", ".join(d.split("\n")) 
 85  
63  86  def category(self): 
64  87  return self.parent().category() # Shouln't it be Category of elements of ...? 
65  88  