Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-31 Thread sympy
Updates: Labels: -NeedsReview Comment #24 on issue 2125 by nicolas@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 (No comment was entered for this change.) -- You received this message because you are subscribed to the Google Grou

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-31 Thread sympy
Updates: Status: Fixed Comment #23 on issue 2125 by nicolas@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 (No comment was entered for this change.) -- You received this message because you are subscribed to the Google Groups "sy

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-29 Thread sympy
Comment #22 on issue 2125 by nicolas@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 One remark more: In current master: In [2]: S(2)*[1,1] --- TypeErro

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-29 Thread sympy
Comment #21 on issue 2125 by nicolas@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I opened a pull request: https://github.com/sympy/sympy/pull/178 (Patch content has not change since http://code.google.com/p/sympy/issues/detail?id=212

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-26 Thread sympy
Comment #20 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 By the way, that one is actually issue 1838. -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, se

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-26 Thread sympy
Comment #19 on issue 2125 by Vinzent.Steinberg: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I prefer consistency with python over vectorization of sympy integers. If someone wants this behavior, he can use a special object instead of a list. So +1

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-26 Thread sympy
Comment #18 on issue 2125 by ronan.l...@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Given comment #13, I'm +1 on doing this. -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to thi

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-03-26 Thread sympy
Comment #17 on issue 2125 by nicolas@gmail.com: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 So, is there an agreement on this ? (The point is, I'm developing an interactive console, and I *really* liked to be able to replace every python int by

Re: Issue 2125 in sympy: Using Integers as python slices.

2011-01-23 Thread sympy
Updates: Labels: nicolas.pourcelot Comment #16 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 (No comment was entered for this change.) -- You received this message because you are subscribed to the Google Groups "sympy-

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-21 Thread sympy
Comment #15 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Ah, sorry, I read the code wrong. Never mind that comment. -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-21 Thread sympy
Comment #14 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 @Aaron: "There's no point in testing it five times in Python 2.5+, so I would move the for loop into the else block." Sorry, I don't understand what you me

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #13 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Note that you can implement __index__ method, and still keep a special case concerning lists: class Two(object): def __int__(self): r

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #12 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 "a=S(1); b = S(2); a/b gives 1/2, not 0." In Python 3.x, 1/2 will return 0.5, and in Python 2.x, from future import __truediv__ is already widely used imo.

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #11 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 "a=S(1); b = S(2); a/b gives 1/2, not 0." In Python 3.x, 1/2 will return 0.5, and in Python 2.x, from future import __truediv__ is already widely used imo.

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Updates: Cc: ondrej.certik Ronan.Lamy Comment #10 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I think the whole point of using SymPy Integers instead of Python ints is that you *can* do something like 1/2 and get a Ra

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #9 on issue 2125 by smichr: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I see that it must have some smarts about when to and when not to return an int because a=S(1); b = S(2); a/b gives 1/2, not 0. Are we ever going to be bitten by a situat

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #8 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I agree with Nicolas in the OP. I think if we want to allow something like vector multiplication, we should create our own Vector class. There is much more benefit to

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #7 on issue 2125 by smichr: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I'm -1 on this. If this is allowed it means that we will lose the ability to do sympy things with the Integers, like vector multiplication (should that ever gain a favora

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #6 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 There's no point in testing it five times in Python 2.5+, so I would move the for loop into the else block. As long as sympy still runs and test still pass in Python 2.

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Updates: Labels: NeedsReview Comment #5 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Yes. :) Here is a tiny patch for review. It implements this functionality for Python 2.5+. (Since it isn't a core functi

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Issue 2125: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 This issue is now blocking issue 1838. See http://code.google.com/p/sympy/issues/detail?id=1838 -- You received this message because you are listed in the owner or CC fields of this issue, or becaus

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #4 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Interesting. What exactly does this __index__() method do? Does it just return int(self)? -- You received this message because you are subscribed to the Google Groups

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #3 on issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 "(though you might have to implement it manually, like in issue 1838, if the Python object doesn't handle rmul on its own)" Once __index__() method is added

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #2 on issue 2125 by asmeurer: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 Similar is issue 1838. Regarding S(2)*'1', this definitely should not return S(2). See the discussion at http://groups.google.com/group/sympy/browse_thread/thread/c94

Re: Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Comment #1 on issue 2125 by Vinzent.Steinberg: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 +1 for allowing Integer(2)*'1' == '11'. Maybe someone thought this should be sympified instead (returning Integer(2))? Please feel free to propose changes

Issue 2125 in sympy: Using Integers as python slices.

2010-12-20 Thread sympy
Status: Accepted Owner: nicolas.pourcelot CC: Vinzent.Steinberg, asmeurer, smichr Labels: Type-Defect Priority-Medium New issue 2125 by nicolas.pourcelot: Using Integers as python slices. http://code.google.com/p/sympy/issues/detail?id=2125 I'd like to be able to use sympy Integers everywhere