Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41042 > unrolled thread
| Started by | "Joseph L. Casale" <jcasale@activenetwerx.com> |
|---|---|
| First post | 2013-03-10 22:18 +0000 |
| Last post | 2013-03-10 22:18 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: Switch statement "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-03-10 22:18 +0000
| From | "Joseph L. Casale" <jcasale@activenetwerx.com> |
|---|---|
| Date | 2013-03-10 22:18 +0000 |
| Subject | RE: Switch statement |
| Message-ID | <mailman.3171.1362953935.2939.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
> Or could you do something like: > > arguments_to_pass = [list of some sort] > switch.get(var, default)(*arguments_to_pass) Stevens lambda suggestion was most appropriate. Within the switch, there are functions called with none, or some variation of arguments. It was not easy to pass them in after the fact, especially since the same function may have different args depending on which case. The lamda worked well. Thanks guys! jlc
Back to top | Article view | comp.lang.python
csiph-web