Permalink
Browse files

Strip trailing whitespaces all over SymPy

except:

- thirdparty packages
- pprint tests, where they are needed
  • Loading branch information...
1 parent adc0d84 commit 54183704523f5f8b0276d4bd0f04bf57468d274d Kirill Smelkov committed Apr 20, 2008
Showing with 519 additions and 527 deletions.
  1. +2 −2 README
  2. +1 −1 TODO
  3. +1 −1 bin/generate_test_list.py
  4. +4 −4 bin/test_isolated
  5. +1 −1 bin/test_pure
  6. +1 −1 bin/test_pure_plotting
  7. +2 −2 data/TeXmacs/bin/tm_sympy
  8. +1 −1 doc/Makefile
  9. +1 −1 doc/api/index.txt
  10. +1 −1 doc/generate_reference.py
  11. +2 −2 doc/man/isympy.xml
  12. +1 −1 doc/src/aboutus.txt
  13. +33 −33 doc/src/guide.txt
  14. +1 −1 doc/src/index.txt
  15. +1 −1 doc/src/modules.txt
  16. +3 −3 doc/src/outreach.txt
  17. +14 −14 doc/src/sympy-patches-tutorial.txt
  18. +35 −35 doc/src/tutorial.txt
  19. +3 −3 examples/all
  20. +1 −1 examples/fem_test.py
  21. +2 −2 examples/print_pretty.py
  22. +2 −2 examples/print_pygame.py
  23. +8 −8 examples/relativity.py
  24. +3 −3 examples/t.py
  25. +2 −2 examples/tensors.py
  26. +5 −5 sympy/core/add.py
  27. +6 −6 sympy/core/assumptions.py
  28. +6 −6 sympy/core/basic.py
  29. +16 −16 sympy/core/decimal_math.py
  30. +12 −12 sympy/core/function.py
  31. +1 −1 sympy/core/interval.py
  32. +2 −2 sympy/core/methods.py
  33. +3 −3 sympy/core/operations.py
  34. +2 −2 sympy/core/sympify.py
  35. +2 −2 sympy/core/tests/test_arit.py
  36. +2 −2 sympy/core/tests/test_eval_power.py
  37. +4 −4 sympy/core/tests/test_functions.py
  38. +3 −3 sympy/core/tests/test_str.py
  39. +2 −2 sympy/functions/elementary/complexes.py
  40. +4 −4 sympy/functions/elementary/exponential.py
  41. +3 −3 sympy/functions/elementary/tests/test_complexes.py
  42. +4 −4 sympy/functions/elementary/trigonometric.py
  43. +2 −2 sympy/functions/special/polynomials.py
  44. +1 −1 sympy/functions/special/tests/test_polynomials.py
  45. +3 −3 sympy/geometry/ellipse.py
  46. +1 −1 sympy/geometry/tests/test_geometry.py
  47. +5 −5 sympy/integrals/trigonometry.py
  48. +1 −1 sympy/ntheory/primetest.py
  49. +1 −1 sympy/ntheory/residue.py
  50. +0 −8 sympy/ntheory/tests/test_ntheory.py
  51. +1 −1 sympy/numerics/functions2.py
  52. +1 −1 sympy/numerics/quad.py
  53. +12 −12 sympy/parsing/mathematica.py
  54. +1 −1 sympy/parsing/maxima.py
  55. +2 −2 sympy/parsing/tests/test_maxima.py
  56. +1 −1 sympy/physics/tests/test_matrices.py
  57. +37 −37 sympy/plotting/plot.py
  58. +2 −2 sympy/plotting/plot_axes.py
  59. +1 −1 sympy/plotting/plot_camera.py
  60. +15 −15 sympy/plotting/plot_controller.py
  61. +1 −1 sympy/plotting/plot_interval.py
  62. +6 −6 sympy/plotting/plot_mode.py
  63. +2 −2 sympy/plotting/plot_mode_base.py
  64. +2 −2 sympy/plotting/plot_modes.py
  65. +1 −1 sympy/plotting/plot_rotation.py
  66. +4 −4 sympy/plotting/plot_window.py
  67. +4 −4 sympy/polynomials/base.py
  68. +4 −4 sympy/polynomials/div_.py
  69. +10 −10 sympy/polynomials/factor_.py
  70. +3 −3 sympy/polynomials/fast/gfpoly.py
  71. +12 −12 sympy/polynomials/fast/intpoly.py
  72. +2 −2 sympy/polynomials/fast/modint.py
  73. +2 −2 sympy/polynomials/groebner_.py
  74. +7 −7 sympy/polynomials/tests/test_polynomials.py
  75. +7 −7 sympy/polynomials/tests/test_polynomials_fast.py
  76. +1 −1 sympy/printing/latex.py
  77. +3 −3 sympy/printing/pretty/stringpict.py
  78. +2 −2 sympy/printing/pretty/tests/test_pretty.py
  79. +1 −1 sympy/printing/printer.py
  80. +2 −2 sympy/printing/tests/test_python.py
  81. +47 −47 sympy/series/gruntz.py
  82. +1 −1 sympy/series/limits.py
  83. +3 −3 sympy/series/limits_series.py
  84. +8 −8 sympy/series/order.py
  85. +1 −1 sympy/series/tests/test_gruntz.py
  86. +4 −4 sympy/series/tests/test_order.py
  87. +2 −2 sympy/series/tests/test_series.py
  88. +1 −1 sympy/simplify/simplify.py
  89. +12 −12 sympy/simplify/sqrtdenest.py
  90. +2 −2 sympy/solvers/solvers.py
  91. +2 −2 sympy/solvers/tests/test_ode.py
  92. +2 −2 sympy/solvers/tests/test_recurr.py
  93. +1 −1 sympy/specfun/tests/test_factorials.py
  94. +3 −3 sympy/test_external/test_numpy.py
  95. +12 −12 sympy/utilities/mathml/__init__.py
  96. +13 −13 sympy/utilities/mathml/data/mmlctop.xsl
  97. +15 −15 sympy/utilities/mathml/data/mmltex.xsl
  98. +13 −13 sympy/utilities/mathml/data/simple_mmlctop.xsl
  99. +1 −1 sympy/utilities/memoization.py
  100. +2 −2 sympy/utilities/pkgdata.py
  101. +8 −8 sympy/utilities/pytest.py
View
@@ -6,11 +6,11 @@ A Python library for symbolic mathematics.
http://code.google.com/p/sympy/
All people who contributed to SymPy by sending at least a patch or more (in
-the order of the date of their first contribution):
+the order of the date of their first contribution):
Ondrej Certik <ondrej@certik.cz>
Fabian Seoane <fabian@fseoane.net>
Jurjen N.E. Bos <jnebos@gmail.com>
- Mateusz Paprocki <mattpap@gmail.com>
+ Mateusz Paprocki <mattpap@gmail.com>
Marc-Etienne M.Leveille <protonyc@gmail.com>
Brian Jorgensen <brian.jorgensen@gmail.com>
Jason Gedge <inferno1386@gmail.com>
View
@@ -2,7 +2,7 @@ Current problems are tracked at:
http://code.google.com/p/sympy/issues/list
-for ideas what should be done in the more distant future, see:
+for ideas what should be done in the more distant future, see:
http://code.google.com/p/sympy/wiki/Discussion
but generally ask on the SymPy mailinglist for uptodate future plan. :)
@@ -1,7 +1,7 @@
"""
Execute like this:
-$ python bin/generate_test_list.py
+$ python bin/generate_test_list.py
tests = [
'sympy.concrete.tests',
'sympy.core.tests',
View
@@ -1,11 +1,11 @@
#! /usr/bin/python
"""
Generates a bash script, that executes py.test or nosetest on each file
-individually.
+individually.
Example:
- $ bin/test_isolated
+ $ bin/test_isolated
Generating py.test isolated testsuite...
Done. Run '/tmp/test_sympy.sh'.
@@ -43,7 +43,7 @@ def get_paths(level=6):
def generate_test_script1(testlib="py.test"):
"""Generates a bash script for doing the test.
-
+
"testlib" is the name of the executable, that is going to execute the test,
for example "py.test" or "nosetests".
"""
@@ -60,7 +60,7 @@ def generate_test_script1(testlib="py.test"):
def generate_test_script2(testlib="nosetests"):
"""Generates a bash script for doing the test.
-
+
"testlib" is the name of the executable, that is going to execute the test,
for example "py.test" or "nosetests".
"""
View
@@ -1,5 +1,5 @@
# This script is for testig SymPy in pure Python environment
-#
+#
# Usage
# -----
# In this directory execute:
@@ -1,5 +1,5 @@
# This script is for testig SymPy plotting in pure Python environment
-#
+#
# Usage
# -----
# In this directory execute:
@@ -4,7 +4,7 @@
#
# This plugin supports LaTeX printing of SymPy expressions
# using sympy.printing.latex function. It handles pretty
-# printing of containers. If you wish to display raw
+# printing of containers. If you wish to display raw
# Python code, then use 'print' before an expression.
#
# TeXmacs encodes new-lines as spaces so we must use
@@ -13,7 +13,7 @@
# in a sequence. However you can and must indent your
# expression using standard Pyhon rules.
#
-# You can retrive the last output using '_' built-in
+# You can retrive the last output using '_' built-in
# symbol. If the previous command did not generate
# any ouput, it will be assigned with None.
#
View
@@ -35,7 +35,7 @@ clean:
$(SPHINXBUILDpy):
rm -rf sphinx
mkdir sphinx
- cd sphinx; wget http://pypi.python.org/packages/source/S/Sphinx/Sphinx-$(SPHINXVER).tar.gz;
+ cd sphinx; wget http://pypi.python.org/packages/source/S/Sphinx/Sphinx-$(SPHINXVER).tar.gz;
cd sphinx; tar xzf Sphinx-$(SPHINXVER).tar.gz
html: $(SPHINXBUILDpy) spt-printable
View
@@ -3,7 +3,7 @@ Welcome to SymPy API reference
This is an automaticaly generated API documentation from SymPy sources.
-Click the "modules" (:ref:`modindex`) link in the top right corner to
+Click the "modules" (:ref:`modindex`) link in the top right corner to
browse the modules.
Or click the "index" to see an index of all SymPy functions, methods and
@@ -14,7 +14,7 @@ def isclass(x):
def ismethod(x):
from inspect import ismethod as _ismethod
- if _ismethod(x) or isinstance(x, (types.MethodType, types.FunctionType,
+ if _ismethod(x) or isinstance(x, (types.MethodType, types.FunctionType,
types.UnboundMethodType)) or str(type(x)) in [
"<type 'classmethod'>", "<type 'staticmethod'>"]:
return True
View
@@ -8,7 +8,7 @@
docbook2x-man isympy.xml
-this will generate isympy.1 in the current directory. -->
+this will generate isympy.1 in the current directory. -->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "Fabian">
@@ -26,7 +26,7 @@ this will generate isympy.1 in the current directory. -->
<!-- http://www.tldp.org/HOWTO/Man-Page/q2.html). But limit -->
<!-- the length to 30 chars. -->
<!ENTITY dhtitle "&dhpackage; command-line reference">
-
+
<!ENTITY dhucpackage "isympy">
<!ENTITY dhpackage "isympy">
View
@@ -4,7 +4,7 @@ About
SymPy Development Team
----------------------
-SymPy is a team project and it was developed by a lot of people.
+SymPy is a team project and it was developed by a lot of people.
Here is a list of contributors together with what they do, plus links to their
wiki pages (if they have one on the page `People
View
@@ -74,9 +74,9 @@ into the function ``Add.flatten()``::
@classmethod
def flatten(cls, seq):
- """
+ """
Takes the sequence "seq" of nested Adds and returns a flatten list.
-
+
Returns: (commutative_part, noncommutative_part, lambda_args,
order_symbols)
@@ -95,17 +95,17 @@ into the function ``Add.flatten()``::
and then you can study how it works. I am going to stop here, this should be
enough to get you going -- with the above technique, I am able to understand
-almost any Python code.
+almost any Python code.
.. note:: The above debugging was done on the revision `75544c92be1d <http://hg.sympy.org/sympy/rev/75544c92be1d>`_.
SymPy's Architecture
====================
-We try to make the sources easily understandable, so you can look into the sources and read the doctests, it should be well documented and if you don't understand something, ask on the mailinglist.
+We try to make the sources easily understandable, so you can look into the sources and read the doctests, it should be well documented and if you don't understand something, ask on the mailinglist.
You can find all the decisions archived in the Issues, to see rationale for
-doing this and that.
+doing this and that.
Basics
------
@@ -119,7 +119,7 @@ class supports.
For easier use, there is a syntactic sugar for expressions like:
-``cos(x)+1`` is equal to ``cos(x).__add__(1)`` is equal to ``Add(cos(x),Integer(1))``
+``cos(x)+1`` is equal to ``cos(x).__add__(1)`` is equal to ``Add(cos(x),Integer(1))``
or
@@ -149,7 +149,7 @@ the only requirement is that all equivalent expressions must have the same
canonical form. We tried the conversion to a canonical (standard) form to be
as fast as possible and also in a way so that the result is what you would
write by hand - so for example ``b*a + -4 + b + a*b + 4 + (a+b)**2`` becomes
-``2*a*b + b + (a+b)**2``.
+``2*a*b + b + (a+b)**2``.
Whenever you construct an expression, for example ``Add(x, x)``, the
``Add.__new__()`` is called and it determines what to return. In this case::
@@ -163,7 +163,7 @@ Whenever you construct an expression, for example ``Add(x, x)``, the
Out[3]: <class 'sympy.core.mul.Mul'>
``e`` is actually an instance of ``Mul(2, x)``, because ``Add.__new__()``
-retuned ``Mul``.
+retuned ``Mul``.
Comparisons
-----------
@@ -180,7 +180,7 @@ We made the following decision in SymPy: ``a=Symbol("x")`` and another
``b=Symbol("x")`` (with the same string "x") is the same thing, i.e ``a==b`` is
``True``. We chose ``a==b``, because it is more natural - ``exp(x)==exp(x)`` is
also ``True`` for the same intance of ``x`` but different instances of ``exp``,
-so we chose to have ``exp(x)==exp(x)`` even for different instances of ``x``.
+so we chose to have ``exp(x)==exp(x)`` even for different instances of ``x``.
Sometimes, you need to have a unique symbol, for example as a temporary one in
some calculation, which is going to be substituted for something else at the
@@ -202,7 +202,7 @@ don't implement the ``fdiff()`` method and you construct an expression using
such a class, then trying to use the ``Basic.series()`` method will raise an
exception of not founding the ``fdiff()`` method in your class. This "duck
typing" has an advantage that you just implement the functionality which you
-need.
+need.
You can define the function ``cos`` like this::
@@ -289,7 +289,7 @@ both inside and outside of SymPy. Unapplied functions ``sign`` is just the class
sign
-Both inside and outside of SymPy.
+Both inside and outside of SymPy.
This is the current structure of classes in SymPy::
class BasicType(type):
@@ -338,23 +338,23 @@ Here it's how to define a derivative of the function::
return sympify(0)
So guess what this ``my_function`` is going to be? Well, it's derivative is
-``cos`` and the function value at 0 is 0, but let's pretend we don't know::
+``cos`` and the function value at 0 is 0, but let's pretend we don't know::
In [2]: my_function(x).series(x, 0, 10)
- Out[2]:
- 3 5 7 9
- x x x x
+ Out[2]:
+ 3 5 7 9
+ x x x x
x - ── + ─── - ──── + ────── + O(x**10)
- 6 120 5040 362880
+ 6 120 5040 362880
Looks familiar indeed::
In [3]: sin(x).series(x, 0, 10)
- Out[3]:
- 3 5 7 9
- x x x x
+ Out[3]:
+ 3 5 7 9
+ x x x x
x - ── + ─── - ──── + ────── + O(x**10)
- 6 120 5040 362880
+ 6 120 5040 362880
Let's try some more complicated example. Let's define the derivative in terms of the function itself::
@@ -373,20 +373,20 @@ Let's try some more complicated example. Let's define the derivative in terms of
So what is ``what_am_i``? Let's try it::
In [4]: what_am_i(x).series(x, 0, 10)
- Out[4]:
- 3 5 7 9
- x 2*x 17*x 62*x
+ Out[4]:
+ 3 5 7 9
+ x 2*x 17*x 62*x
x - ── + ──── - ───── + ───── + O(x**10)
- 3 15 315 2835
+ 3 15 315 2835
Well, it's ``tanh``::
In [5]: tanh(x).series(x, 0, 10)
- Out[5]:
- 3 5 7 9
- x 2*x 17*x 62*x
+ Out[5]:
+ 3 5 7 9
+ x 2*x 17*x 62*x
x - ── + ──── - ───── + ───── + O(x**10)
- 3 15 315 2835
+ 3 15 315 2835
The new functions we just defined are regular SymPy objects, you
can use them all over SymPy, e.g.::
@@ -405,14 +405,14 @@ Please use the same way as is shown below all across SymPy.
In [1]: e = sign(x**2)
In [2]: e.args
- Out[2]:
+ Out[2]:
⎛ 2⎞
⎝x ⎠
In [3]: e.args[0]
- Out[3]:
+ Out[3]:
2
- x
+ x
In [4]: (x+y*z).args
Out[4]: (y*z, x)
@@ -447,7 +447,7 @@ Applied functions::
In [2]: isinstance(e, Function)
Out[2]: True
-So ``e`` is a ``sign(z)`` function, but not ``exp(z)`` function.
+So ``e`` is a ``sign(z)`` function, but not ``exp(z)`` function.
Unapplied functions::
@@ -476,7 +476,7 @@ Contributing
We welcome every SymPy user to participate in it's development. Don't worry if
you've never contributed to any open source project, we'll help you learn
-anything necessary, just ask on our mailinglist.
+anything necessary, just ask on our mailinglist.
Don't be afraid to ask anything and don't worry that you are wasting our time
if you are new to SymPy and ask questions that maybe most of the people know
View
@@ -5,7 +5,7 @@
Welcome to SymPy's documentation!
=================================
-This is the central page for all SymPy's documentation.
+This is the central page for all SymPy's documentation.
If you are new to SymPy, start with the Tutorial.
View
@@ -11,7 +11,7 @@ API documentation
-----------------
This documents all SymPy modules and it is automatically generated from SymPy
-sources.
+sources.
Click the "modules" (:ref:`modindex`) link in the top right corner for
automatically generated documentation.
@@ -1,7 +1,7 @@
SymPy Presentations
-------------------
-Presentations about SymPy given at conferences are at
+Presentations about SymPy given at conferences are at
`SymPyPresentations <http://code.google.com/p/sympy/wiki/SymPyPresentations>`_
Planet SymPy
@@ -17,7 +17,7 @@ SymPy has a collection of official logos, that can be accessed here:
http://sympy.googlecode.com/svn/materials/logo/
The license of all the logos is the same as SymPy: BSD. See the LICENSE file in
-the trunk for more information.
+the trunk for more information.
Google Summer of Code
---------------------
@@ -36,7 +36,7 @@ Here we list blog/news/magazines mentioning SymPy that we know of.
* Penguin.cz: `Zajímavé programy 50`_ (Czech), July 2007
* Penguin.cz: `Zajímavé programy 55`_ (Czech), October 2007
* `Python Magazine`_, Volume 1, Issue 11, November 2007
-* SymPy and Sage is mentioned in: `CAS and Python`_, December 2007
+* SymPy and Sage is mentioned in: `CAS and Python`_, December 2007
.. _Zajímavé programy 50: http://www.penguin.cz/novinky-view.php?id=1142
.. _Zajímavé programy 55: http://www.penguin.cz/novinky-view.php?id=1149
Oops, something went wrong. Retry.

0 comments on commit 5418370

Please sign in to comment.