mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Add Py3k warnings to os.path.walk
This commit is contained in:
parent
9ec4aa01f9
commit
0893a0a961
6 changed files with 23 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
"""Pathname and path-related operations for the Macintosh."""
|
||||
|
||||
import os
|
||||
import warnings
|
||||
from stat import *
|
||||
import genericpath
|
||||
from genericpath import *
|
||||
|
@ -169,7 +170,7 @@ def walk(top, func, arg):
|
|||
beyond that arg is always passed to func. It can be used, e.g., to pass
|
||||
a filename pattern, or a mutable object designed to accumulate
|
||||
statistics. Passing None for arg is common."""
|
||||
|
||||
warnings.warnpy3k("In 3.x, os.path.walk is removed in favor of os.walk.")
|
||||
try:
|
||||
names = os.listdir(top)
|
||||
except os.error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue