[Zope-dev] Re: [Python-Dev] Syntax error in python2.6
On Mon, Jul 21, 2008 at 16:35, Tres Seaver <[EMAIL PROTECTED]> wrote: > 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. OK, cool. Changing from "with" to "with_" is probably a good solution then. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Python-Dev] Syntax error in python2.6
-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 [EMAIL PROTECTED] 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- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Python-Dev] Syntax error in python2.6
Lennart Regebro wrote: 2. Using **kw in the argument and looking for noth "with" and "with_", that way, which will be backwards compatible. +1 \malthe ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Python-Dev] Syntax error in python2.6
On Mon, Jul 21, 2008 at 14:09, Bristow Thankachan <[EMAIL PROTECTED]> wrote: > Can anybody tell me whether this implies it is backward compatible in > python2.4? If you change the API it isn't backwards compatible. The question is if this is a problem or not, if anything outside Zope itself is using this call, which is hard to say. Options here are 1. Deprecating the "with" parameter for "with_" and supporting both in 2.12 but not supporting Python2.6. 2. Using **kw in the argument and looking for noth "with" and "with_", that way, which will be backwards compatible. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )