[Zope-dev] Re: [Python-Dev] Syntax error in python2.6

Tres Seaver tseaver at palladion.com
Mon Jul 21 10:35:44 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Malthe Borch wrote:
> Lennart Regebro wrote:
>> 2. Using **kw in the argument and looking for noth "with" and "with_",
>> that way, which will be backwards compatible.
> 
> +1

The implementation of this function is already so obscure that using
keywords should not be a problem.

OTOH, the reorder function in RestrictedPython was ported from a version
originally designed for doing ordered select lists in DTML:

 $ cvs log lib/python/DocumentTemplate/DT_Util.py
 ...
 revision 1.52
 date: 1999/03/22 17:28:37;  author: jim;  state: Exp;  lines: +31 -2
 Added a new "builtin" function reorder:

   reorder(s, [with, without]]) --

      Reorder the items in s according to the order given in with
      and with items mentioned in without removed.  Items from s
      not mentioned in with are removed.

      s, with, and without are all either sequences if strings
      or sequences of key-value tuples, with ordering done on the
      keys.

 This function is useful for constructing ordered select lists.
 ...

The only use of the method in Zope's own DTML is in the addZClass.dtml
template.  I'm willing to bet that *nobody* who is still using it would
be surprised if they had to recode it when upgrading to a recent Zope,
so maybe we can just change the trunk without worrying about it.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIhJ7A+gerLs4ltQ4RAk6lAJ0T6JJC/4nr6kA7jzSQqKSNZUGP7ACeIO2R
H7k2D46BKQ+DL0girE8EGOk=
=HLxo
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list