Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106052
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: sympy |
| Date | 2016-03-30 22:29 +1100 |
| Message-ID | <mailman.194.1459337388.28225.python-list@python.org> (permalink) |
| References | <733f5f0d-9b4e-4023-897b-e1f2730c39cb@googlegroups.com> |
Poul Riis <priisdk@gmail.com> writes: > Is it possible to transfer results from sympy to 'normal' python. Is Sympy not “normal Python”? What transfer are you intending? > In the case below I think my intention is clear enough but it does not > work as intended. How can it be done? First: no, your intention is not clear. Please write idiomatic Python: spaces around operators, names which describe the meaning. Follow the coding style guide PEP 8 <URL:https://www.python.org/dev/peps/pep-0008/>. Second: no, the intent is obscured because you are using ‘from sympy import *’. This clobbers the global namespace, making it much more difficult to tell which names come from a different namespace. Instead, do ‘import sympy’ and qualify names ‘sympy.Symbol’, etc. Third: if the code “does not work as intended”, then the answer can be no better than “change it until it works as intended”. If you want more detail, please provide more detail on what it *is* doing, and what you think it *should* do instead. -- \ “I bet one legend that keeps recurring throughout history, in | `\ every culture, is the story of Popeye.” —Jack Handey | _o__) | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sympy Poul Riis <priisdk@gmail.com> - 2016-03-30 04:17 -0700
Re: sympy Ben Finney <ben+python@benfinney.id.au> - 2016-03-30 22:29 +1100
Re: sympy Ned Batchelder <ned@nedbatchelder.com> - 2016-03-30 04:39 -0700
Re: sympy Steven D'Aprano <steve@pearwood.info> - 2016-03-30 23:56 +1100
Re: sympy Poul Riis <priisdk@gmail.com> - 2016-03-30 08:23 -0700
Re: sympy Robert Kern <robert.kern@gmail.com> - 2016-03-30 16:29 +0100
Re: sympy Steven D'Aprano <steve@pearwood.info> - 2016-03-31 02:59 +1100
Re: sympy Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-03-31 17:49 +1300
Re: sympy Poul Riis <priisdk@gmail.com> - 2016-03-30 23:51 -0700
Re: sympy Poul Riis <priisdk@gmail.com> - 2016-03-31 03:57 -0700
Re: sympy Peter Otten <__peter__@web.de> - 2016-03-31 16:55 +0200
Re: sympy Chris Angelico <rosuav@gmail.com> - 2016-04-01 04:05 +1100
Re: sympy Peter Otten <__peter__@web.de> - 2016-03-31 19:51 +0200
Re: sympy Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-03-31 19:59 +0100
Re: sympy Poul Riis <priisdk@gmail.com> - 2016-03-31 14:33 -0700
Re: sympy Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-03-31 23:26 +0100
csiph-web