From 0f82bb9c56eb8c7069e20e1948504deac213169e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Nov 2018 01:25:58 -0400 Subject: [PATCH] symbol_sequence.py: use generator expressions where applicable. --- mjo/symbol_sequence.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mjo/symbol_sequence.py b/mjo/symbol_sequence.py index 63c8316..b7c438f 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 range(0,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 @@ -328,8 +328,8 @@ class SymbolSequence: # corresponding to the second coordinate, with the first # coordinate(s) fixed. if isinstance(key, slice): - ss = [ SymbolSequence(w._repr_(), w._latex_(), self._domain) - for w in v ] + ss = ( SymbolSequence(w._repr_(), w._latex_(), self._domain) + for w in v ) # This might be nested... maybe_nested_list = [ s._subscript_tuple_(args) for s in ss ] -- 2.44.2