Dot operator magic has me stymied...

2008-10-29 Thread Casey Rodarmor
nstance instead of a function instance has messed up the magic of the dot operator, causing it not to bind the foo instance to the self argument. Can anybody shed some light on what's happening here? Also, I really do like using classes as decorators. Are there any workarounds to get it to wor

Stop tab-completing empty lines!

2008-01-17 Thread Casey Rodarmor
Hi everybody, I have the following in my python startup file: import readline, rlcompleter readline.parse_and_bind("tab: complete") This lets me tab complete identifiers in the interpreter beautifully, but there's a tiny problem... If I'm sitting at the beginning of a blank line and just want a

Re: Replace stop words (remove words from a string)

2008-01-17 Thread Casey Rodarmor
That's much better than what I was about to post: for s in stoplist: string.join(mystr.split(s, "")) Berlin: Why are you keen on avoiding split()? On 1/17/08, Karthik <[EMAIL PROTECTED]> wrote: > > How about - > > for s in stoplist: > string.replace(mystr, s, "") > > Hope this should

Extending the readline module?

2008-01-16 Thread Casey Rodarmor
branch. What is the best way to go about doing this? Best regards, Casey Rodarmor -- http://mail.python.org/mailman/listinfo/python-list