--On 4. Juni 2006 12:42:38 -1000 John Schinnerer <[EMAIL PROTECTED]> wrote:

So far I am only coming up with what seem to be cumbersome solutions that
have unecessary overhead (comparing a list option with every element in
lines property via python script to see if it should be set selected, and
repeating for every list option)...is there a better way?

Since you have to compare each item of the option list against a given list of items you *must* do this comparison...how else would you be able which items should be selected. The only optimization I can imagine is to convert the the list of given items into a dict to perform a lookup in constant time instead of O(length_of_given_list).


ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting

Attachment: pgp7S8cQbzFm1.pgp
Description: PGP signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to