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/003571.html below:

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:45:51 -0700 (PDT)
On Fri, 14 Apr 2000, Mark Hammond wrote:
> > I think that we get 95% of the benefit without any of the
> > "dangers"
> > (though I don't agree with the arguments against) if we allow the
> > attachment of properties only at compile time and
> > disallow mutation of
> > them at runtime.
> 
> AFAIK, this would be a pretty serious change.  The compiler just
> generates (basically)PyObject_SetAttr() calls.  There is no way in
> the current runtime to differentiate between "compile time" and
> "runtime" attribute references...  If this was done, it would simply
> be ugly hacks to support what can only be described as unpythonic in
> the first place!
> 
> [Unless of course Im missing something...]

You aren't at all! Paul hit his head, or he is assuming some additional
work to allow the compiler to know more. I agree with you: compilation in
Python is just code execution; there is no way Python can disallow runtime
changes.

(from a later note, it appears he is referring to introducing "decl",
 which I don't think is on the table for 1.6)

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