From 40e57ac3a162f3e6f32153a7a2757ffa1dbf445c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 5 Jul 2014 21:19:24 -0500 Subject: [PATCH] Fix doctests, PEP8 --- pymbolic/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pymbolic/__init__.py b/pymbolic/__init__.py index 5e6aa2e..3e1a2de 100644 --- a/pymbolic/__init__.py +++ b/pymbolic/__init__.py @@ -49,7 +49,7 @@ Next, let's create an expression using *x*: >>> u = (x+1)**5 >>> u - Power(Sum(Variable('x'), 1), 5) + Power(Sum((Variable('x'), 1)), 5) >>> print u (x + 1)**5 @@ -103,9 +103,9 @@ You can also easily define your own objects to use inside an expression: ... mapper_method = "map_fancy_operator" ... >>> u - Power(Sum(Variable('x'), 1), 5) + Power(Sum((Variable('x'), 1)), 5) >>> 17*FancyOperator(u) - Product(17, FancyOperator(Power(Sum(Variable('x'), 1), 5))) + Product((17, FancyOperator(Power(Sum((Variable('x'), 1)), 5)))) As a final example, we can now derive from *MyMapper* to multiply all *FancyOperator* instances by 2. @@ -117,10 +117,10 @@ As a final example, we can now derive from *MyMapper* to multiply all ... return 2*FancyOperator(self.rec(expr.operand)) ... >>> MyMapper2()(FancyOperator(u)) - Product(2, FancyOperator(Power(Product(Variable('x'), 1), 5))) + Product((2, FancyOperator(Power(Product((Variable('x'), 1)), 5)))) """ -from pymbolic.version import VERSION_TEXT as __version__ +from pymbolic.version import VERSION_TEXT as __version__ # noqa import pymbolic.parser import pymbolic.compiler -- GitLab