Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
dispatcher = dict()
dispatcher[0]=foo # Not foo(): we bind the dictionary entry to the function's object,
# NOT to the results returned by an invocation of the function
dispatcher[1]=bar
dispatcher[2]=baz # foo,bar, baz, and boz are defined functions.
# Then later
results = dispatcher.get(x, boz)() # binding results to a name is optional
# or with no "default" case:
if x in dispatcher:
results=dispatcher[x]()