Add Py3k warnings to os.path.walk

This commit is contained in:
Benjamin Peterson 2008-05-09 00:27:01 +00:00
parent 9ec4aa01f9
commit 0893a0a961
6 changed files with 23 additions and 6 deletions

View file

@ -9,6 +9,8 @@ import os
import sys
import stat
import genericpath
import warnings
from genericpath import *
__all__ = ["normcase","isabs","join","splitdrive","split","splitext",
@ -248,7 +250,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: