<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/Lib/glob.py, branch v2.5b2</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>glob('anything*/') would fail because isdir is in os.path, not os.</title>
<updated>2006-04-09T03:35:43+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2006-04-09T03:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=e36029a81e48ca07927c2a4bf09b338ab24a70af'/>
<id>e36029a81e48ca07927c2a4bf09b338ab24a70af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #943206:</title>
<updated>2005-01-08T13:13:19+00:00</updated>
<author>
<name>Johannes Gijsbers</name>
<email>jlg@dds.nl</email>
</author>
<published>2005-01-08T13:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=66bff3cedf2a6c7a5c7f4ae9379bbd5b922268b3'/>
<id>66bff3cedf2a6c7a5c7f4ae9379bbd5b922268b3</id>
<content type='text'>
`glob.glob()` currently calls itself recursively to build a list of matches of
the dirname part of the pattern and then filters by the basename part. This is
effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
directories 5 levels deep even if only a handful of them contain a ``foo``
entry. A generator-based recusion would never have to store these list at once
by implementing DFS. This patch converts the `glob` function to an `iglob`
recursive generator . `glob()` now just returns ``list(iglob(pattern))``.

I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
created a second `glob0` helper func so that the main loop need not be
duplicated).

Thanks to Cherniavsky Beni for the patch!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`glob.glob()` currently calls itself recursively to build a list of matches of
the dirname part of the pattern and then filters by the basename part. This is
effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
directories 5 levels deep even if only a handful of them contain a ``foo``
entry. A generator-based recusion would never have to store these list at once
by implementing DFS. This patch converts the `glob` function to an `iglob`
recursive generator . `glob()` now just returns ``list(iglob(pattern))``.

I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
created a second `glob0` helper func so that the main loop need not be
duplicated).

Thanks to Cherniavsky Beni for the patch!
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob.</title>
<updated>2004-08-30T10:19:56+00:00</updated>
<author>
<name>Johannes Gijsbers</name>
<email>jlg@dds.nl</email>
</author>
<published>2004-08-30T10:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=e54bb8574dd05077c532c8ae6555d1a2c405602b'/>
<id>e54bb8574dd05077c532c8ae6555d1a2c405602b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #409973: Speedup glob.glob, add fnmatch.filter.</title>
<updated>2001-06-06T06:24:38+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2001-06-06T06:24:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=4d74dff64fb5df4c667988f6e3bbced2f6c9fa2c'/>
<id>4d74dff64fb5df4c667988f6e3bbced2f6c9fa2c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>more __all__ updates</title>
<updated>2001-01-20T23:34:12+00:00</updated>
<author>
<name>Skip Montanaro</name>
<email>skip@pobox.com</email>
</author>
<published>2001-01-20T23:34:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=cd351243c6160c04203dad8547035beebd1cf4c3'/>
<id>cd351243c6160c04203dad8547035beebd1cf4c3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Whitespace normalization.</title>
<updated>2001-01-14T23:47:14+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-01-14T23:47:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=463a4d72cebbeba055706a84114afc69f2ced67c'/>
<id>463a4d72cebbeba055706a84114afc69f2ced67c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert all remaining *simple* cases of regex usage to re usage.</title>
<updated>1997-10-22T21:00:49+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>1997-10-22T21:00:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=3ccd1e6e796323cb4f464f847130a5b67fc3db1b'/>
<id>3ccd1e6e796323cb4f464f847130a5b67fc3db1b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>New doc strings.</title>
<updated>1997-04-02T05:47:11+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>1997-04-02T05:47:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=d8b7ba7902ab6abe5642dcb6ef3fbc1f277d9590'/>
<id>d8b7ba7902ab6abe5642dcb6ef3fbc1f277d9590</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Never return a non-existing pathname.</title>
<updated>1992-01-12T23:32:11+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>1992-01-12T23:32:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b575a33fbfe365b2c604de7ce689a38cda4512bb'/>
<id>b575a33fbfe365b2c604de7ce689a38cda4512bb</id>
<content type='text'>
Rewrote has_magic using a regular expression match.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rewrote has_magic using a regular expression match.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use module 'os'</title>
<updated>1992-01-12T23:26:24+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>1992-01-12T23:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=2ba5d14ebe6cf9cd2403d0607aa97f52014bd604'/>
<id>2ba5d14ebe6cf9cd2403d0607aa97f52014bd604</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
