Title: Implementation if cascaded conditionals in musicxml/lymus2musxml.py · Issue #117 · frescobaldi/python-ly · GitHub
Open Graph Title: Implementation if cascaded conditionals in musicxml/lymus2musxml.py · Issue #117 · frescobaldi/python-ly
X Title: Implementation if cascaded conditionals in musicxml/lymus2musxml.py · Issue #117 · frescobaldi/python-ly
Description: I was just starting to look into Felippe's pull requests (noticing that there are still a number open), and when following the GIthub interface to look into merge conflicts I stumbled over the following: In (for example) musicxml.lymus2m...
Open Graph Description: I was just starting to look into Felippe's pull requests (noticing that there are still a number open), and when following the GIthub interface to look into merge conflicts I stumbled over the foll...
X Description: I was just starting to look into Felippe's pull requests (noticing that there are still a number open), and when following the GIthub interface to look into merge conflicts I stumbled over the ...
Opengraph URL: https://github.com/frescobaldi/python-ly/issues/117
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implementation if cascaded conditionals in musicxml/lymus2musxml.py","articleBody":"I was just starting to look into Felippe's pull requests (noticing that there are still a number open), and when following the GIthub interface to look into merge conflicts I stumbled over the following:\r\n\r\nIn (for example) `musicxml.lymus2musxml.ParseSource.Command()` supported commands are checked in a long `if ... elif ...` conditional. And any new supported command will have to add one `elif` level to that list, which seems somewhat inefficient to me.\r\n\r\nWouldn't it be better and more Pythonic to maintain the supported commands in a dictionary with functions as their values? So handling a command would use something like `supported_commands.get(input, fallback_function)`?\r\n\r\nThere are a number of such methods, and it seems useful to me to generalize this a bit. I would volunteer to do that (also as a means of finally getting my feet wet with python-ly) but I'd like to have some feedback first.","author":{"url":"https://github.com/uliska","@type":"Person","name":"uliska"},"datePublished":"2018-05-04T09:37:12Z","url":"https://github.com/frescobaldi/python-ly/issues/117"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b512709c-278f-d9a3-be4a-e3420db327bc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECF4:23535A:8B5C86:B2116E:6B09B841 |
| html-safe-nonce | 2d25e6c8753877ed1cfdbd7a015fd7459de51d065dff246c4046f1d15f369b39 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0Y0OjIzNTM1QTo4QjVDODY6QjIxMTZFOjZCMDlCODQxIiwidmlzaXRvcl9pZCI6IjgwMTEyOTQ5NzAyMjMzNzY0NTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ab74e615c51d01be433f4e8df8ce77f82955b526e9946725b65f9973306039ca |
| hovercard-subject-tag | issue:320210590 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/frescobaldi/python-ly/117/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3af6b969bc0ca8145b48e9a6ca899f18553794acf8f419ef4ab82306dbd71165/frescobaldi/python-ly/issues/117 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3af6b969bc0ca8145b48e9a6ca899f18553794acf8f419ef4ab82306dbd71165/frescobaldi/python-ly/issues/117 |
| og:image:alt | I was just starting to look into Felippe's pull requests (noticing that there are still a number open), and when following the GIthub interface to look into merge conflicts I stumbled over the foll... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | uliska |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29e6866c4c5b6697a062df08d37fa80bbfb75810ca4280c0d277f04956012d39 |
| turbo-cache-control | no-preview |
| go-import | github.com/frescobaldi/python-ly git https://github.com/frescobaldi/python-ly.git |
| octolytics-dimension-user_id | 19853952 |
| octolytics-dimension-user_login | frescobaldi |
| octolytics-dimension-repository_id | 29728425 |
| octolytics-dimension-repository_nwo | frescobaldi/python-ly |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29728425 |
| octolytics-dimension-repository_network_root_nwo | frescobaldi/python-ly |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e72aac8801621433bb0313888fbbe243f5998abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width