Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7fd4b68a
Commit
7fd4b68a
authored
Nov 06, 2012
by
Tim Golden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct mis-indented whitespace
parent
8f323d9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
Lib/glob.py
Lib/glob.py
+16
-16
No files found.
Lib/glob.py
View file @
7fd4b68a
...
...
@@ -27,22 +27,22 @@ def iglob(pathname):
return
pathnames
=
expand_braces
(
pathname
)
for
pathname
in
pathnames
:
dirname
,
basename
=
os
.
path
.
split
(
pathname
)
if
not
dirname
:
yield
from
glob1
(
None
,
basename
)
return
if
has_magic
(
dirname
):
dirs
=
iglob
(
dirname
)
else
:
dirs
=
[
dirname
]
if
has_magic
(
basename
):
glob_in_dir
=
glob1
else
:
glob_in_dir
=
glob0
for
dirname
in
dirs
:
for
name
in
glob_in_dir
(
dirname
,
basename
):
yield
os
.
path
.
join
(
dirname
,
name
)
dirname
,
basename
=
os
.
path
.
split
(
pathname
)
if
not
dirname
:
yield
from
glob1
(
None
,
basename
)
return
if
has_magic
(
dirname
):
dirs
=
iglob
(
dirname
)
else
:
dirs
=
[
dirname
]
if
has_magic
(
basename
):
glob_in_dir
=
glob1
else
:
glob_in_dir
=
glob0
for
dirname
in
dirs
:
for
name
in
glob_in_dir
(
dirname
,
basename
):
yield
os
.
path
.
join
(
dirname
,
name
)
# These 2 helper functions non-recursively glob inside a literal directory.
# They return a list of basenames. `glob1` accepts a pattern while `glob0`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment