From: <pj...@us...> - 2009-10-01 01:13:24
|
Revision: 6816 http://jython.svn.sourceforge.net/jython/?rev=6816&view=rev Author: pjenvey Date: 2009-10-01 01:13:04 +0000 (Thu, 01 Oct 2009) Log Message: ----------- correct the callable check fixes #1478 Modified Paths: -------------- trunk/jython/NEWS trunk/jython/src/org/python/modules/_collections/PyDefaultDict.java Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-10-01 01:06:20 UTC (rev 6815) +++ trunk/jython/NEWS 2009-10-01 01:13:04 UTC (rev 6816) @@ -1,5 +1,9 @@ Jython NEWS +Jython 2.5.2a1 + Bugs Fixed + - [ 1478 ] defaultdict & weakref.WeakKeyDictionary [TypeError: first argument must be callable] + Jython 2.5.1rc3 Bugs Fixed - [ 1466 ] wrong handling of append only files Modified: trunk/jython/src/org/python/modules/_collections/PyDefaultDict.java =================================================================== --- trunk/jython/src/org/python/modules/_collections/PyDefaultDict.java 2009-10-01 01:06:20 UTC (rev 6815) +++ trunk/jython/src/org/python/modules/_collections/PyDefaultDict.java 2009-10-01 01:13:04 UTC (rev 6816) @@ -54,7 +54,7 @@ int nargs = args.length - kwds.length; if (nargs != 0) { defaultFactory = args[0]; - if (defaultFactory.__findattr__("__call__") == null) { + if (!defaultFactory.isCallable()) { throw Py.TypeError("first argument must be callable"); } PyObject newargs[] = new PyObject[args.length - 1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |