[Patches] [ python-Patches-765238 ] fix fnmatch.__all__

SourceForge.net noreply@sourceforge.net
Sun, 13 Jul 2003 08:20:38 -0700


Patches item #765238, was opened at 2003-07-03 05:54
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=765238&group_id=5470

Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: Postponed
Priority: 5
Submitted By: George Yoshida (quiver)
>Assigned to: Martin v. Löwis (loewis)
Summary: fix fnmatch.__all__

Initial Comment:
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
<built-in function 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__.




----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-07-13 10:20

Message:
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?

----------------------------------------------------------------------

Comment By: George Yoshida (quiver)
Date: 2003-07-07 07:32

Message:
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.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-07-05 11:02

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=765238&group_id=5470