w chun wrote:
> it sounds like you did not develop the original code. it seems to
> work... why are you trying to replace it? are you refactoring?
No it is not my code. I am trying to get it running in Jython which does
not support the bool function. I may refactor it after I get it working
i
w chun wrote:
>>> prefix = os.path.commonprefix(filter( bool, lines ))
>
> that is an interesting and yes, not very optimal way of saving the set
> of non-blank lines. the commonprefix() function takes a list of
> pathnames and returns the longest prefix that all strings have in
> common, pr
> > prefix = os.path.commonprefix(filter( bool, lines ))
that is an interesting and yes, not very optimal way of saving the set
of non-blank lines. the commonprefix() function takes a list of
pathnames and returns the longest prefix that all strings have in
common, presumably for disk filena
Don Taylor wrote:
> I am trying to get some existing CPython 2.4 code working under Jython
> (2.1) and I am puzzled by a line in the following function. It seems to
> be a Python 2.4 idiom that is opaque to me.
>
> The line is:
> prefix = os.path.commonprefix(filter( bool, lines ))
>
> an
I am trying to get some existing CPython 2.4 code working under Jython
(2.1) and I am puzzled by a line in the following function. It seems to
be a Python 2.4 idiom that is opaque to me.
The line is:
prefix = os.path.commonprefix(filter( bool, lines ))
and I don't understand what that 'bo