Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing case / switch / evaluate #46546

Closed
dbodin mannequin opened this issue Mar 15, 2008 · 2 comments
Closed

Missing case / switch / evaluate #46546

dbodin mannequin opened this issue Mar 15, 2008 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@dbodin
Copy link
Mannequin

dbodin mannequin commented Mar 15, 2008

BPO 2293
Nosy @tiran

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-03-15.16:43:46.483>
created_at = <Date 2008-03-15.16:41:08.491>
labels = ['interpreter-core', 'invalid']
title = 'Missing case / switch / evaluate'
updated_at = <Date 2008-03-15.16:43:46.472>
user = 'https://bugs.python.org/dbodin'

bugs.python.org fields:

activity = <Date 2008-03-15.16:43:46.472>
actor = 'christian.heimes'
assignee = 'none'
closed = True
closed_date = <Date 2008-03-15.16:43:46.483>
closer = 'christian.heimes'
components = ['Interpreter Core']
creation = <Date 2008-03-15.16:41:08.491>
creator = 'dbodin'
dependencies = []
files = []
hgrepos = []
issue_num = 2293
keywords = []
message_count = 2.0
messages = ['63555', '63556']
nosy_count = 2.0
nosy_names = ['christian.heimes', 'dbodin']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue2293'
versions = ['3rd party']

@dbodin
Copy link
Mannequin Author

dbodin mannequin commented Mar 15, 2008

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?

@dbodin dbodin mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Mar 15, 2008
@tiran
Copy link
Member

tiran commented Mar 15, 2008

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".

@tiran tiran closed this as completed Mar 15, 2008
@tiran tiran added the invalid label Mar 15, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

1 participant