On Tue, 08 Sep 2009 04:58:38 -0500
Jason Grout <jason-s...@creativetrax.com> wrote:

> 
> This seems really odd to me.  I expected to get back n() applied to
> each element of the list.
> 
> sage: n([1,2])
> 1.00000000000000 + 2.00000000000000*I
> 
> Does anyone else find this behavior uncomfortable?

I would call it a bug, a side effect of trying to convert the argument
to a complex number as a last resort.

We also have:

sage: n([1])
<boom>
sage: n([1,2,3])
<boom>

etc.

The question is, do we want this case to also raise an error, or the
function n() to iterate over the argument when it's iterable? 


Cheers,
Burcin




--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to