Issue1093369
Created on 2004-12-30.17:44:00 by dsuch, last changed 2005-02-19.21:15:33 by bzimmer.
| msg2397 (view) |
Author: Dariusz Suchojad (dsuch) |
Date: 2004-12-30.17:44:00 |
|
This simple patch adds sum() builtin to Jython. I
tested it with a minimal version (also attached) of
test_builtin.py from Python 2.3 test suite. Yes, I do
know sum() first appears in Python 2.3, but sooner or
later Jython will also reach 2.3, hence this patch.
Diffed against today's build of new-style branch.
>>> import sys,os;sys.version;sys.platform
'2.2aNewstyle'
'java1.4.2_06'
|
| msg2398 (view) |
Author: Brian Zimmer (bzimmer) |
Date: 2005-02-19.21:15:33 |
|
Logged In: YES
user_id=37674
I rewrote the patch a bit to use Py.Zero, not check for null from _add
since it will throw an exception on type problems and allow None as a
result value since CPython does as well rather than defaulting to 0. None
as a result value results in a type error.
|
|
| Date |
User |
Action |
Args |
| 2004-12-30 17:44:00 | dsuch | create | |
|