OK.  I have made the change.  See https://github.com/sympy/sympy/pull/58.

Some questions/concerns:

- What is the purpose of the bottom imports (imports at the bottom of the file) 
in some of the sympy/core files?  I moved the from sympify imports from the 
bottom to the top, but left the rest alone because I didn't know why they were 
there.  

- I have added SympifyError to the list of things imported with from sympy 
import *.  Is this a good idea?  It wasn't imported before, but it seems to me 
that you should have these errors in the namespace so that you can catch them.

- Can/should I add a test for the fact that stdlib_symbol is no longer in the 
main namespace?  This isn't the first time we have had junk make its way into 
the main namespace (see http://code.google.com/p/sympy/issues/detail?id=1454).  

- I inserted from sympy.parsing import * in a place where it seemed to work in 
the main __init__.py, but I don't know if this order matters for things other 
than the order that it has to work in.

- Why do we import init_session and init_printing into the global namespace?

Aaron Meurer

On Dec 29, 2010, at 1:14 AM, Ondrej Certik wrote:

> On Tue, Dec 28, 2010 at 11:56 PM, Robert Kern <robert.k...@gmail.com> wrote:
>> On Tue, Dec 28, 2010 at 17:28, Aaron S. Meurer <asmeu...@gmail.com> wrote:
>>> I just had a conversation on #python about this.  After a bit of talk about 
>>> "from __future__ import absolute_import", which doesn't work in Python 2.4 
>>> and would require us changing all of our non-absolute imports everywhere 
>>> (the person I talked with said we would pretty much have to use it 
>>> everywhere in SymPy),
>> 
>> I don't think this is not true. You would just need to do it in the
>> one module that needs the stdlib's symbol module.
>> 
>>> explicit relative imports (also not supported in Python 2.4, but supported 
>>> without __future__ in Python 2.5+), and renaming symbol.py (which would 
>>> also be a lot of work), I figured out that the solution is much simpler 
>>> than that.  We just need to move ast_parser_python24.py, which is the only 
>>> file that uses this stdlib_symbol, to a separate directory from sympy/core.
>> 
>> This is probably the best idea.
> 
> Yes, let's do that.
> 
> Ondrej
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to