Re: [Zope] Underscore Caracter

2000-10-07 Thread knight
> 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 > > implic

Re: [Zope] Underscore Caracter

2000-10-07 Thread Kapil Thangavelu
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 Zop

Re: [Zope] Underscore Caracter

2000-09-06 Thread Toby Dickenson
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 PROTECT

Re: [Zope] Underscore Caracter

2000-09-06 Thread Duncan Booth
Tino Wildenhain wrote: > > Turn "asd_asd" into "asd asd" and output: > > > > > > > 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() should be a bit faster. I think the reasons ma

RE: [Zope] Underscore Caracter

2000-09-05 Thread Chris McDonough
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 to

RE: [Zope] Underscore Caracter

2000-09-05 Thread Dennis Nichols
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, b

RE: [Zope] Underscore Caracter

2000-09-05 Thread T.J. Mannos
MAIL PROTECTED] [mailto:[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: >

RE: [Zope] Underscore Caracter

2000-09-05 Thread Chris McDonough
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('

RE: [Zope] Underscore Caracter

2000-09-05 Thread T.J. Mannos
T.J. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf 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 &quo

Re: [Zope] Underscore Caracter

2000-09-05 Thread Tino Wildenhain
Hi Chris, Chris McDonough wrote: > > Hi Marcus, > > This is untested. > > Turn "asd asd" into "asd_asd" and output: > > > > Turn "asd_asd" into "asd asd" and output: > > > I've seen this on plenty lines of digicools code and wondered about if this is more efficient then using just string

Re: [Zope] Underscore Caracter

2000-09-04 Thread Chris McDonough
Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: Turn "asd_asd" into "asd asd" and output: On Sun, 3 Sep 2000, Marcus Mendes wrote: > Hello, > > I need replace 0x20 (space caracter ) to Undescore Caracter. I need also > a function that UNDO this operation. How can I