A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046474.html below:

[Python-Dev] Re: Rationale behind removing kwdict from keyword.py?

[Python-Dev] Re: Rationale behind removing kwdict from keyword.py?Fernando Perez fperez528 at yahoo.com
Wed Jul 28 06:09:35 CEST 2004
Jeff Epler wrote:

> In 2.3, __all__ = ["iskeyword", "kwlist"]
> 
> In the absence of separate documentation, I think __all__ may be the
> best hint you have about what the "external API" of a module is.

Indeed, lesson learned.  In my slim defense, seeing in help(keyword):

DATA
    __all__ = ['iskeyword', 'kwlist']
    keyword = 'yield'
    kwdict = {'and': 1, 'assert': 1, 'break': 1, 'class': 1, 'continue': 1...
    kwlist = ['and', 'assert', 'break', 'class', 'continue', 'def', 'del',...

I (mistakenly) assumed kwdict was safe for usage.  Relying on help(), while I
acknowledge may have been mistaken, is not IMHO a completely farfetched error. 
Oh well, live and learn :)

Thanks to all for the clarifications.  I'll be far more careful in the future
with my usage of stuff from the stdlib.

Best,

f

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4