shouldn't call all those objectValues into memory. Okay, what's a way
around that? I just need the number ;)
TIA,
Tony
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tue, 13 Mar 2007 1:50 AM
Subject: Re: [Zope] 'int' object
--On 13. März 2007 08:44:52 -0400 [EMAIL PROTECTED] wrote:
AJ says I shouldn't call all those objectValues into memory. Okay, what's
a way around that? I just need the number ;) TIA,
Use objectIds().
-aj
pgpmzXqiQBuFP.pgp
Description: PGP signature
Hi;
I've written this PT:
span tal:define=batch here/quotes/objectValues; num python:len(batch)
p tal:replace=python:here.randomNumber(num) /
/span
...which calls this external method:
import random
def randomNumber(num):
return random.random(num)
...and throws this error:
Error Type:
span tal:define=batch here/quotes/objectValues; num python:len(batch)
p tal:replace=python:here.randomNumber(num) /
/span
Check what here/quotes is evaluating to. Seems that it is int.
--
Maciej Wisniowski
___
Zope maillist - Zope@zope.org