Hi Laura,
On Sun, May 08, 2005 at 02:06 +0200, Laura Creighton wrote:
> See my questions about hpk's checkin
confusion, confusion :-)
Actually the below checkin relates to py-dev not pypy-dev.
and to answer your question: filter(None, somelist) is a nice
idiom to filter out false arguments such as None or empty
strings. Please restart/repost this thread at py-dev
if there is a need.
cheers,
holger
> ------- Forwarded Message
>
> In a message of Sat, 07 May 2005 21:36:18 +0200, [EMAIL PROTECTED] writes:
> >Author: hpk
> >Date: Sat May 7 21:36:17 2005
> >New Revision: 12054
> >
> >Modified:
> > py/dist/py/test/collect.py
> >Log:
> >don't iterate over empty names
> >
> >
> >Modified: py/dist/py/test/collect.py
> >=========================================================================
> >=====
> >--- py/dist/py/test/collect.py (original)
> >+++ py/dist/py/test/collect.py Sat May 7 21:36:17 2005
> >@@ -48,7 +48,7 @@
> > Directory = py.test.Config.getvalue('Directory', pkgpath)
> > current = Directory(pkgpath)
> > #print "pkgpath", pkgpath
> >- names = fspath.relto(pkgpath).split(fspath.sep)
> >+ names = filter(None, fspath.relto(pkgpath).split(fspath.sep))
> > for name in names:
> > current = current.join(name)
> > assert current, "joining %r resulted in None!" % (names,)
> >_______________________________________________
> >py-svn mailing list
> >[EMAIL PROTECTED]
> >http://codespeak.net/mailman/listinfo/py-svn
>
> This seems to fail the 'straightforwardness test' ....
> any real reason we need filter there, or am i just lost?
>
> Laura
>
> ------- End of Forwarded Message
>
> _______________________________________________
> [email protected]
> http://codespeak.net/mailman/listinfo/pypy-dev
>
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev