Title: `foreach` over dynamic `PyObject` · Issue #1680 · pythonnet/pythonnet · GitHub
Open Graph Title: `foreach` over dynamic `PyObject` · Issue #1680 · pythonnet/pythonnet
X Title: `foreach` over dynamic `PyObject` · Issue #1680 · pythonnet/pythonnet
Description: Environment Pythonnet version: 3.0.0 Python version: 3.9.5 Operating System: windows 10 .NET Runtime: .NET 6 Details Describe what you were trying to get done. foreach a tuple at runtime via "dynamic" keyword What commands did you run to...
Open Graph Description: Environment Pythonnet version: 3.0.0 Python version: 3.9.5 Operating System: windows 10 .NET Runtime: .NET 6 Details Describe what you were trying to get done. foreach a tuple at runtime via "dynam...
X Description: Environment Pythonnet version: 3.0.0 Python version: 3.9.5 Operating System: windows 10 .NET Runtime: .NET 6 Details Describe what you were trying to get done. foreach a tuple at runtime via "...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1680
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`foreach` over dynamic `PyObject`","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.0\r\n- Python version: 3.9.5\r\n- Operating System: windows 10\r\n- .NET Runtime: .NET 6\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n- foreach a tuple at runtime via \"dynamic\" keyword \r\n\r\n\r\n- What commands did you run to trigger this issue? If you can provide a\r\n [Minimal, Complete, and Verifiable example] (http://stackoverflow.com/help/mcve)\r\n this will help us understand the issue.\r\n `\r\n dynamic sys = Py.Import(\"sys\");\r\n dynamic path2 = sys.path;\r\n \r\n foreach (PyObject item in path2)\r\n {\r\n Console.WriteLine(item);\r\n }\r\n`\r\n\r\n- If there was a crash, please include the traceback here.\r\n\r\n**Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: \"Cannot implicitly convert type 'Python.Runtime.PyObject' to 'System.Collections.IEnumerable'. An explicit conversion exists (are you missing a cast?)\"**\r\n","author":{"url":"https://github.com/CodingMadness","@type":"Person","name":"CodingMadness"},"datePublished":"2022-01-25T02:42:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1680/pythonnet/issues/1680"}
| 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:b43565fa-4ace-94cc-8cd1-34bf593f5b9c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D886:2ACEE1:2040752:2B506B7:697032E3 |
| html-safe-nonce | 9e72c093649fbea02cfacc252fb7c564d7f7007d409ded0e7d10c2039120c1ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODg2OjJBQ0VFMToyMDQwNzUyOjJCNTA2Qjc6Njk3MDMyRTMiLCJ2aXNpdG9yX2lkIjoiMzQ4NDMxODY1MDYxODQ3Nzc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dd563ecd7648964e553f98291fff3c0a949e700fd980f14aec6fe752797c5a8d |
| hovercard-subject-tag | issue:1113357728 |
| 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/pythonnet/pythonnet/1680/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ef7c7e99fef7195a45318ed8dde16d57a0eb4ec9a3e0ed632a2b32e70d0eb2b6/pythonnet/pythonnet/issues/1680 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ef7c7e99fef7195a45318ed8dde16d57a0eb4ec9a3e0ed632a2b32e70d0eb2b6/pythonnet/pythonnet/issues/1680 |
| og:image:alt | Environment Pythonnet version: 3.0.0 Python version: 3.9.5 Operating System: windows 10 .NET Runtime: .NET 6 Details Describe what you were trying to get done. foreach a tuple at runtime via "dynam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CodingMadness |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | f643964067a552f02067066d6a910b2f90a5721f |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width