Issue 765238: fix fnmatch.all - Python tracker (original) (raw)

Created on 2003-07-03 10:54 by quiver, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fnmatch.py.diff quiver,2003-07-03 10:54 patch created with diff -u
Messages (6)
msg44212 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2003-07-03 10:54
There are two reasons for this patch. First, in the fnmatch.py, __all__ doesn't include "filter", so if you tried to use fnmatch.filter like this, >>> from fnmatch import * >>> filter built-in function, filter, is called instead of fnmatch.filter. >>> filter Second, "translate" is just a helper function used by other functions in the fnmatch module, and that's why it's not documented in the Python library reference. I think "translate" should be removed from fnmatch.__all__.
msg44213 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-07-05 16:02
Logged In: YES user_id=21627 While I agree with that, I feel that it is too late for 2.3: this is an interface change. So postponing it to 2.4.
msg44214 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2003-07-07 12:32
Logged In: YES user_id=671362 > this is an interface change. If you're reluctant to remove "translate", that's OK. I just propose to add "filter" to __all__. That won't do any harm. > I feel that it is too late for 2.3: I don't feel it's too late for 2.3. There's at least one month left before the final release of 2.3.
msg44215 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-07-13 15:20
Logged In: YES user_id=80475 Even in Py2.4, I prefer that "translate" not be removed -- it has already been exposed and there is not real benefit to pulling it back -- also, it may have some use as a stand- alone function. I would not mind if "filter" were added to __all__ for Py2.3 -- IMO, that part is a bug fix. Martin, is this okay with you?
msg44216 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-07-13 15:42
Logged In: YES user_id=21627 Raymond: I agree. Adding filter is a bugfix; removing translate should not happen at all. Please make it happen before 2.3.
msg44217 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-07-13 16:07
Logged In: YES user_id=80475 Done. See Lib/fnmatch.py 1.14 George, thanks for submitting patch.
History
Date User Action Args
2022-04-10 16:09:40 admin set github: 38781
2003-07-03 10:54:11 quiver create