Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium NeedsReview smichr

New issue 2403 by [email protected]: simplify could accept more symbol containers
http://code.google.com/p/sympy/issues/detail?id=2403

Only tuple and list are being allowed right now but we now work with sets, too, and Tuple. Perhaps we need a list_like utility function to standardize this with an option to allow dictionaries:

    def list_like(i, dict_ok=True):
        if type(i) is dict and dict_ok:
            return True
        return hasattr(i, '__iter__') or hasattr('__getitem__')

Perhaps there could be an option to exclude iterators.

For now I'm just allowing anything with the iter or getitem attr.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
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