Issue 1178: sympify uses a mutable object with a keyword argument
http://code.google.com/p/sympy/issues/detail?id=1178

New issue report by ellisonbg:
The current implementation of sympify looks like:

def sympify(a, locals= {}):
     ...


This causes locals to be remembered between calls to sympify:

The easiest way of seeing this is to do the following in isympy:

In [1]: sympify('x')
Out[1]: x

In [2]: sympify?

You will see that locals is no longer an empty dict, but the user's entire
locals namespace, from the previous call to sympify.

The fix is to do:

def sympify(a, locs= None):
     if locs is None:
         locals = {}
     else:
         locals = locs
     ...



Issue attributes:
        Status: New
        Owner: ----
        Labels: Type-Defect Priority-Medium

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to