On Mon, Oct 19, 2009 at 12:22 PM, finotti <luis.fino...@gmail.com> wrote:
>
> Dear all,
>
> I see that "max" in Sage is not the "max" of Python:
>
> =============================
> Python 2.5.2 (r252:60911, Jan  4 2009, 21:59:32)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> v=[10,2,3,1,45]
>>>> max(v)
> 45
>
> =============================
>
> =============================
> ----------------------------------------------------------------------
> | Sage Version 4.1.2, Release Date: 2009-10-13                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: v=[10,2,3,1,45]
> sage: max(v)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
>
> /home/dept/finotti/.sage/temp/boole.math.utk.edu/11162/
> _home_dept_finotti_comp_sage_pol_power_sage_2.py in <module>()
>
> TypeError: 'sage.rings.integer.Integer' object is not callable
> =============================
>
> ("max?" shows me that it is not the same and what Sage's max does.)
> Is there a function similar to Pythons.  (Of course, it is easy to
> write, but the built in should be much faster.)

That's weird, since I get:

wst...@sage:~$ sage
----------------------------------------------------------------------
| Sage Version 4.1.2, Release Date: 2009-10-14                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: v=[10,2,3,1,45]
sage: max(v)
45
sage: max?
...
Namespace:      Python builtin

---

Maybe you redefined max yourself and caused some confusion?

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to