[Erp5-dev] allowing re in ZMI
Jean-Paul Smets
jp at nexedi.com
Wed Jun 13 13:45:16 CEST 2007
bartek a écrit :
> Hello
>
> Are there any serious objections agains allowing import of re in ZMI
> scripts? We make heavy use of them for various purposes, and as of
> today it has all to be either in classes or in external methods, which
> is very cumbersome and difficult to maintain. Allowing them is a
> matter of changing one line in one script in the Zope core. So perhaps
> it could be allowed, either as part of site deployment, or, better
> still, in the default Zope setup for ERP5?
>
> Bartek
>
I do not want that we use re in scripts all over the system. Here are
the reasons :
- I do not want re text expressions hidden everywhere in the system.
This is the main reason. Many re expressions should typically be
configurable on a per site basis. I prefer the approach of Document.py.
The expression is defined as a preference and there is an API on
Document.py for using it. Scripts the invoke the class API.
- consider designing API and class interfaces first. Some class
methods may be re based.
- if you need to use regular expressions for a quick hack, you can
use external methods. portal_classes makes this very quick and easy.
- I trust Zope corp on this. So, no re is safer (incl. for the
system stability).
Regards,
JPS.
More information about the Erp5-dev
mailing list