[issue2551031] fix 'mach n mit Funktionsobjekt'

Henrike Schwenn <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
New submission from Henrike Schwenn:

'''Funktion soll
    Funktionsobjekt f und Zahl n als Argumente entgegennehmen
    das Funktionsobjekt n-mal hintereinander ausführen'''


def mach_n(f,n):
    if n <= 0:
        return
    else:
        f
        mach_n(f,n-1)

f = beliebige_funktion # wild card for any function f

def beliebige_funktion(): #define function f here
    Body

#Test

f=print_doof()

def print_doof():
	print('doof')

RUN MODULE

mach_n(f,6) RESTART: C:\Users\Henrike
Schwenn\Roaming\Programs\Python\Python36\eigene Funktionen\rekursive
Funktionen\mach_n mit Funktionsobjekt.py 
Traceback (most recent call last):
  File "C:\Users\Henrike Schwenn\Roaming\Programs\Python\Python36\eigene
Funktionen\rekursive Funktionen\mach_n mit Funktionsobjekt.py", line 13,
in <module>
    f = beliebige_funktion # wild card for any function f
NameError: name 'beliebige_funktion' is not defined
>>> 

TYPE: SYNTAX

----------
messages: 6396
nosy: When in trouble, go to the library
severity: minor
status: new
title: fix 'mach n mit Funktionsobjekt'
type: resource usage
versions: devel

_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551031>
_________________________________________________


_______________________________________________
Roundup-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.