[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-dev
Subject: [Zope-dev] proposition about the module RegularExpressionConversion
From: Lucie Lejard <lucie () sixfeetup ! com>
Date: 2007-10-29 19:31:35
Message-ID: 47263517.2040903 () sixfeetup ! com
[Download RAW message or body]
Hi,
I am using RegularExpressionConversion (from ZConfig/datatypes.py) and
thought it be neat to have an init method looking like this:
def __init__(self, regex, options):
self._rx = re.compile(regex, options)
so that we can pass re.DOTALL as an argument for example.
And also have the call method:
def __call__(self, value):
m = self._rx.match(value)
use "search" instead of "match", to not be forced to have characters
matching at the beginning of "value".
Is it a good idea? Is there any reason why we couldn't do that?
Thanks
Lucie
--
S i x F e e t U p , I n c . | "Nowhere to go but open source"
Silicon Valley: +1 (650) 401-8579 x605
Midwest: +1 (317) 861-5948 x605
Toll-Free: 1-866-SIX-FEET
mailto:lucie@sixfeetup.com
http://www.sixfeetup.com | Zope/Plone Custom Development
_______________________________________________
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 )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic