PEP318: property as decoration

Gerrit Holl gerrit at
Thu Jun 12 11:40:23 CEST 2003

Sean Ross wrote:
> Newsgroups: comp.lang.python
> Subject: Re: PEP318: property as decoration

> "Gerrit Holl" <gerrit at> wrote in message
> > Hmm, that doesn't seem to work. __doc__ is not in my local namespace yet.
> Here`s a brittle hack to resolve that issue:

Such a hack isn't that hard of course.
I solved it by adding "d=" just before my docstring: __doc__
doesn't need to stay anyway, because this outer function gets overwritten
by the property.

[skipped code]

> As I say, "this" is a very brittle hack, so don't try this at home (pardon
> the pun)

The only place I use frames is in by debug() function: this way, it
prints the function and lineno of the caller, which easy's debugging.


168. If a man wish to put his son out of his house, and declare before
the judge: "I want to put my son out," then the judge shall examine into
his reasons. If the son be guilty of no great fault, for which he can be
rightfully put out, the father shall not put him out.
        -- 1780 BC, Hammurabi, Code of Law
Asperger Syndroom - een persoonlijke benadering:
Het zijn tijden om je zelf met politiek te bemoeien:

More information about the Python-list mailing list