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/2010-September/103578.html below:

[Python-Dev] terminology for "free variables" in Python

[Python-Dev] terminology for "free variables" in PythonNick Coghlan ncoghlan at gmail.com
Sat Sep 11 01:59:44 CEST 2010
On Sat, Sep 11, 2010 at 6:46 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> [me]
>> Although it *is* somewhat handy for quick introspection at the
>> interpreter prompt... maybe I should document it after all. Thoughts?
>
> IMO show_code() is not a good name, because the only thing it doesn't
> do is to -- show the code.
>
> I'd rather call it "codeinfo" (which also is more in line with current
> dis module function names).

And, indeed, the variant I added that just returns the formatted
string instead of printing it directly to stdout is called
dis.code_info.

dis.show_code is the existing helper that Guido added way back in
2007. As the checkin comment from back then put it, it shows you
everything the interpreter knows about the code object except the
details of the bytecode (which is already covered by dis.dis).

So while I agree the name isn't great, I also don't think it is wrong
enough to bother changing.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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