Discussion:
[Erp5-dev] allowing re in ZMI
bartek
2007-06-13 11:32:30 UTC
Permalink
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
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Jean-Paul Smets
2007-06-13 11:45:16 UTC
Permalink
Post by bartek
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.

Loading...