[dialog/adherent] possibilité de changer les études d'un adhérent
This commit is contained in:
parent
c95859507e
commit
865699e911
3 changed files with 225 additions and 6 deletions
|
@ -46,6 +46,11 @@ class TailCaller(object) :
|
|||
"""
|
||||
Classe permetant, en décorant des fonctions avec, d'avoir de la tail récursion
|
||||
faite "à la main" en python (voir http://kylem.net/programming/tailcall.html)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
f : function
|
||||
Fonction décoré
|
||||
"""
|
||||
other_callers = {}
|
||||
def __init__(self, f) :
|
||||
|
@ -193,6 +198,7 @@ class Dialog(object):
|
|||
# décorée par TailCaller et pas les méthodes statiques de la classe Dialog
|
||||
if getattr(ret, 'tailCaller', False) and not isinstance(ret, TailCaller):
|
||||
ret = TailCaller(ret)
|
||||
ret.__doc__ = ret.f.__doc__
|
||||
setattr(self, attr, ret)
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue