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/2000-April/003531.html below:

Arbitrary attributes on funcs and methods)

[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods) [Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)Skip Montanaro skip@mojam.com (Skip Montanaro)
Fri, 14 Apr 2000 09:39:27 -0500 (CDT)
    >> Yes, of course people will use it to get the effect of function
    >> statics.  OK by me.  People do the same thing today with class data
    >> attributes (i.e., to

    AMK> Wait, the attributes added to a function are visible inside the
    AMK> function?  (I haven't looked that closely at the patch?)

No, they aren't.  There is no change of Python's scoping rules using Barry's
function attributes patch.  In fact, they are *only* available to the
function itself via the function's name in the module globals.  That's why
Fredrik's "eff, bot = bot, eff" trick worked as it did.

-- 
Skip Montanaro | http://www.mojam.com/
skip@mojam.com | http://www.musi-cal.com/



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