[Python-de] Re: [Python-de] "Static" Variabeln in einer Funktion möglich?
"Martin v. Löwis"
martin at v.loewis.de
Sun Apr 13 20:37:57 EDT 2003
Klaus Meyer wrote:
> aha, das klingt interessant. Mir ist das bisher noch nicht bekannt,
> welche Möglichkeiten/Ideen stecken dahinter?
Nichts exotisches. Eine Funktion ist ein Objekt (wie alles andere
in Python auch), und das hat Attribute (wie alles andere in Python
auch). Man kann einer Funktion beliebige Attribute geben, wie vielen
anderen Objekten auch.
> Wie lautet der englische Begriff, dann könnte ich auf python.org mal
> suchen...
"function attributes". Definiert in PEP 232:
http://www.python.org/peps/pep-0232.html
Im Referenzhandbuch ist es in
http://www.python.org/doc/current/ref/types.html
erwähnt.
Ciao,
Martin
More information about the Python-de
mailing list