Sujet : Re: Command Languages Versus Programming Languages
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 02. Apr 2024, 10:26:14
Autres entêtes
Organisation : Stefan Ram
Message-ID : <wrap-20240402092558@ram.dialup.fu-berlin.de>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
def diff( x ):
return 1 if x == 'x' else 0 if type( x )is str
else[ 'sum', diff( x[ 1 ]), diff( x[ 2 ])]
if x[ 0 ]== 'sum' else None
Oops! That was one long line starting with "return";
it was wrapped by the newsreader, but is not correct
Python anymore when wrapped this way.