L'oprateur ternaire n'arrive qu'en Python 2.5...
... et pas sous cette forme. darcs-hash:20080903231431-ffbb2-028e97f54a0b5e68fb4f14f3571bd8e36d9cf402.gz
This commit is contained in:
parent
bfc806f945
commit
e209f42707
1 changed files with 5 additions and 1 deletions
|
@ -2029,7 +2029,11 @@ class Adherent(BaseProprietaire):
|
|||
"""
|
||||
|
||||
if isinstance(valeur, bool):
|
||||
self._set('adherentPayant', valeur and [] or ['FALSE'])
|
||||
if valeur:
|
||||
set_to = []
|
||||
else:
|
||||
set_to = ['FALSE']
|
||||
self._set('adherentPayant', set_to)
|
||||
elif valeur is not None:
|
||||
raise ValueError, u"adherentPayant prend un booléen comme argument"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue