I also agree. Mapping explicitly is a lot clearer and Pythonic. Even the functional languages, with their focus on lists, do mapping explicitly.
On Thu, Sep 24, 2009 at 2:16 PM, William Stein <wst...@gmail.com> wrote: > > On Wed, Sep 23, 2009 at 11:14 PM, Rado <rki...@gmail.com> wrote: > > > > I am not sure if I get a vote, but I wanted to say my opinion as more > > of a Sage user than developer. > > > > Since n() is type conversion of sorts, I would expect it to behave > > similar to python's int() function. Which means just give error if you > > pass it a list (to remind you to use map). "explicit is better than > > implicit" ;) > > > >>>> int(['3','3','4532']) > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > TypeError: int() argument must be a string or a number, not 'list' > > > > Mathematica behaves very differently as tons of its functions take > > lists (even without reference in the help files). > > > > In[1]:= FactorInteger[{3, 5342, 345, 4, 2654, 43}] > > > > Out[1]= {{{3, 1}}, {{2, 1}, {2671, 1}}, {{3, 1}, {5, 1}, {23, > > 1}}, {{2, 2}}, {{2, 1}, {1327, 1}}, {{43, 1}}} > > > > So if Sage wants to act like mathematica a lot of functions need to be > > rewritten. But i think it should stay true to the python way. > > > > Rado > > I agree. I just mainly wanted to point out that even in Mathematica > one couldn't do > > n('3', '3', '4532') > > William > > > > -- Tim Joseph Dumol <tim (at) timdumol (dot) com> --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---