Re: Getting rid of "self."

2005-01-07 Thread Sean Ross
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Thank you for your replies. But they don't deal with my original question. :) I have read the thousands of posts all saying "self is good" and they are right. But this time I want to be different m-kay? I figure that ther

Re: built-in 'property'

2004-12-30 Thread Sean Ross
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] > For this reason, I usually suggest declaring properties like[1]: > > py> class E(object): > ... def x(): > ... def get(self): > ... return float(self._x) > ... def set(self, x): > .

Re: question on regular expressions

2004-12-03 Thread Sean Ross
"Darren Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm stuck. I'm trying to make this: > > file://C:%5Cfolder1%5Cfolder2%5Cmydoc1.pdf,file://C > %5Cfolderx%5Cfoldery%5Cmydoc2.pdf > > (no linebreaks) look like this: > > ./mydoc1.pdf,./mydoc2.pdf > > my regular expression abi

Re: access to generator state

2004-12-02 Thread Sean Ross
"Neal D. Becker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am converting optimization code from legacy C to python. Generators are a > HUGE convenience, because the original code structures have the optimizer > as the main code calling your function, while I want to invert t