Chris McDonough wrote:
Yes. Thank you.
Note however that methods of modules accessed via the underscore namespace
may be filtered individually, so although 'replace' exists as a method of
the Python string module, this does not necessarily make it accessible
implicitly through Zope via
Chris McDonough wrote:
Yes. Thank you.
Note however that methods of modules accessed via the underscore namespace
may be filtered individually, so although 'replace' exists as a method of
the Python string module, this does not necessarily make it accessible
implicitly through
Tino Wildenhain wrote:
Turn "asd_asd" into "asd asd" and output:
dtml-var "_.string.join(_.string.split('asd_asd', '_'))"
I've seen this on plenty lines of digicools code and wondered
about if this is more efficient then using just string.replace()
?
I would say string.replace()
On Tue, 5 Sep 2000 20:23:47 -0600, "T.J. Mannos" [EMAIL PROTECTED]
wrote:
Now, who do I have to beat up to get the 're' module added to the namespace
variable??? :)
Not a good idea its too easy for a buggy regex to eat up lots of
memory and processor time.
Toby Dickenson
[EMAIL PROTECTED]
Hi Chris,
Chris McDonough wrote:
Hi Marcus,
This is untested.
Turn "asd asd" into "asd_asd" and output:
dtml-var "_.string.join(_.string.split('asd asd'), '_')"
Turn "asd_asd" into "asd asd" and output:
dtml-var "_.string.join(_.string.split('asd_asd', '_'))"
I've seen this
Of Chris
McDonough
Sent: Monday, September 04, 2000 5:56 PM
To: Marcus Mendes
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] Underscore Caracter
Hi Marcus,
This is untested.
Turn "asd asd" into "asd_asd" and output:
dtml-var "_.string.join(_.string.split('asd asd'), '_')"
On Tue, 5 Sep 2000, T.J. Mannos wrote:
Hmm.. Shouldn't that be:
_.string.join(_.string.split('asd asd'), ' '), '_')
The second argument is implicit on string.split (it defaults to a single
space). But your way works too.
Or, alternatively (and more intuitively),
_.string.replace('asd
lto:[EMAIL PROTECTED]]On Behalf Of Chris
McDonough
Sent: Tuesday, September 05, 2000 7:54 PM
To: T.J. Mannos
Cc: Marcus Mendes; [EMAIL PROTECTED]
Subject: RE: [Zope] Underscore Caracter
On Tue, 5 Sep 2000, T.J. Mannos wrote:
Hmm.. Shouldn't that be:
_.string.join(_.string.spli
At 9/5/00 09:54 PM, Chris McDonough wrote:
It should be noted that _.string.replace() is not mentioned in the DTML
reference guide. If it exists, it should be used. Sigh. I can't wait
for the Zope Book to come out, I'm going to be the first buyer. ;-)
Not that I would expect it to exist, but
Yes. Thank you.
Note however that methods of modules accessed via the underscore namespace
may be filtered individually, so although 'replace' exists as a method of
the Python string module, this does not necessarily make it accessible
implicitly through Zope via _.string.replace. It happens
Hi Marcus,
This is untested.
Turn "asd asd" into "asd_asd" and output:
dtml-var "_.string.join(_.string.split('asd asd'), '_')"
Turn "asd_asd" into "asd asd" and output:
dtml-var "_.string.join(_.string.split('asd_asd', '_'))"
On Sun, 3 Sep 2000, Marcus Mendes wrote:
Hello,
I need
11 matches
Mail list logo