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/003570.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)Greg Stein gstein@lyra.org
Fri, 14 Apr 2000 14:43:16 -0700 (PDT)
On Fri, 14 Apr 2000, Fredrik Lundh wrote:
> Tim Peters wrote:
> > [Gordon McMillan]
> > > ...
> > > Or are you saying that if functions have attributes, people will
> > > all of a sudden expect that function locals will have initialized
> > > and maintained state?
> > 
> > I expect that they'll expect exactly what happens in JavaScript, which
> > supports function attributes too, and where it's often used as a
> > nicer-than-globals way to get the effect of C-like mutable statics
> > (conceptually) local to the function.
> 
> so it's no longer an experimental feature, it's a "static variables"
> thing?

Don't be so argumentative. Tim suggested a possible use. Not what it
really means or how it really works.

I look at it as labelling a function with metadata about that function. I
use globals or class attrs for "static" data.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/




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