Message324425
match built-in function feature request:
what is the match function do?
the match function is doing something like if but with quick easy syntax that even beginners can use.
possible syntax:
match(list or string or dictionary):
condition: event here
condition: event here
#all conditions are applied at the same time as if not elif and else
#but you use elif or else.
ex:
match(list or string or dictionary):
condition: event here
condition: event here
elif condition: event here
else: event here
example of what I mean:
match([2,5,4,'Hello']):
2: print('here is 2')
6: print('here is 6')
elif 'Hello': ('Hello world')
8:print('here is 8')
elif 'python': ('Hello world')
else: print('MoKhalid')
the output should look like:
here is 2
Hello world
MoKhalid |
|
Date |
User |
Action |
Args |
2018-08-31 14:45:23 | MoKhaild | set | recipients:
+ MoKhaild, ezio.melotti, mrabarnett |
2018-08-31 14:45:23 | MoKhaild | set | messageid: <1535726723.83.0.56676864532.issue34554@psf.upfronthosting.co.za> |
2018-08-31 14:45:23 | MoKhaild | link | issue34554 messages |
2018-08-31 14:45:23 | MoKhaild | create | |
|