Issue2293
Created on 2008-03-15 16:41 by dbodin, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg63555 - (view) | Author: BODIN (dbodin) | Date: 2008-03-15 16:41 | |
I am not the code :
if toto == 1:
...
elsif toto == 2:
...
elsif
In ADA for example :
case C is -- 4 Start a case
statement
when Red => Result := 1;
when Blue =>Result := 2;
when Black .. Brown => Result := 3;
when Orange | Indigo => Result := 4;
when others => Result := 5;required for unspecified cases.
end case;
Is it not better?
|
|||
| msg63556 - (view) | Author: Christian Heimes (christian.heimes) * ![]() |
Date: 2008-03-15 16:43 | |
This is a bug tracker and not a help forum. Please use the Python general mailinglist to get help. Your problem can be solved with a pattern called "dispatcher dict". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:31 | admin | set | github: 46546 |
| 2008-03-15 16:43:46 | christian.heimes | set | status: open -> closed resolution: not a bug messages: + msg63556 nosy: + christian.heimes |
| 2008-03-15 16:41:08 | dbodin | create | |
