X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fsymbol_sequence.py;h=563bab6ad4d190f0cbcaa82e428acc6ea86e2ddf;hb=8698debba196d8746c1a32d8e6866085b6cb2161;hp=3878b7505ba2c34289c1cc3e3b558d82bed1cfc4;hpb=c4203897950b84665ea41ed103f87f68aee0852e;p=sage.d.git diff --git a/mjo/symbol_sequence.py b/mjo/symbol_sequence.py index 3878b75..563bab6 100644 --- a/mjo/symbol_sequence.py +++ b/mjo/symbol_sequence.py @@ -38,7 +38,7 @@ class SymbolSequence: degree:: sage: a = SymbolSequence('a') - sage: p = sum( a[i]*x^i for i in xrange(5) ) + sage: p = sum( a[i]*x^i for i in range(5) ) sage: p a_4*x^4 + a_3*x^3 + a_2*x^2 + a_1*x + a_0 @@ -57,7 +57,7 @@ class SymbolSequence: a_0_1_2 sage: latex(a[0,1,2]) a_{0}_{1}_{2} - sage: [ a[i,j] for i in xrange(2) for j in xrange(2) ] + sage: [ a[i,j] for i in range(2) for j in range(2) ] [a_0_0, a_0_1, a_1_0, a_1_1] You can pass slices instead of integers to obtain a list of @@ -284,7 +284,7 @@ class SymbolSequence: # If the user asks for a slice, we'll be returning a list # of symbols. return [ self._subscript_integer_(idx) - for idx in xrange(start, s.stop, step) ] + for idx in range(start, s.stop, step) ]