Title: Bug: `sep` is ignored while printing when two adjacent values are either strings or integers · Issue #2677 · lcompilers/lpython · GitHub
Open Graph Title: Bug: `sep` is ignored while printing when two adjacent values are either strings or integers · Issue #2677 · lcompilers/lpython
X Title: Bug: `sep` is ignored while printing when two adjacent values are either strings or integers · Issue #2677 · lcompilers/lpython
Description: The value of sep is ignored while printing when two adjacent values are strings. print("a", "b", "c", "d", "e", sep="-") (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py abcde The same is the ...
Open Graph Description: The value of sep is ignored while printing when two adjacent values are strings. print("a", "b", "c", "d", "e", sep="-") (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./ex...
X Description: The value of sep is ignored while printing when two adjacent values are strings. print("a", "b", "c", "d", "e", sep="-") (base) saurabh-k...
Opengraph URL: https://github.com/lcompilers/lpython/issues/2677
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: `sep` is ignored while printing when two adjacent values are either strings or integers","articleBody":"The value of `sep` is ignored while printing when two adjacent values are strings.\r\n\r\n```python\r\nprint(\"a\", \"b\", \"c\", \"d\", \"e\", sep=\"-\")\r\n```\r\n```console\r\n(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py\r\nabcde\r\n```\r\n\r\nThe same is the case for integers.\r\n```python\r\nprint(1, 2, 3, 4, 5, sep=\" is less than \")\r\n```\r\n```console\r\n(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py\r\n12345\r\n```\r\n\r\nPlease note that this is not an issue with the keyword argument itself. When two adjacent objects are necessarily not strings or integers, the value is used.\r\n\r\n```python\r\nprint(1, 2, 3, 4, 5, \"a\", \"b\", \"c\", [1, 2, 3, 4], sep=\"-\u003e\")\r\n```\r\n```console\r\n(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py\r\n12345abc-\u003e[1, 2, 3, 4]\r\n```\r\n\r\nThe presence of a list leads to the usage of the separator.","author":{"url":"https://github.com/kmr-srbh","@type":"Person","name":"kmr-srbh"},"datePublished":"2024-04-30T15:33:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2677/lpython/issues/2677"}
| 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:986b6781-5a96-b90b-ced7-12845c484d14 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2BE:3410DA:13DB72B:19ABAD1:696B1B97 |
| html-safe-nonce | ce6c1b6c797e11e92806dd66ae602801fcf2b4fa0c69690e8d0aa69099a3b1f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkJFOjM0MTBEQToxM0RCNzJCOjE5QUJBRDE6Njk2QjFCOTciLCJ2aXNpdG9yX2lkIjoiMzA3NDkxNDY3OTk2ODk2MTUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f0394b5343d84cad40786bd81ad79b304fd705831788426cb9fe0d21ce0ed3ae |
| hovercard-subject-tag | issue:2271831739 |
| 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/lcompilers/lpython/2677/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5435333039f9ddb0ce8b020bf657498ec0fce63549ea42b2756eca82f5fd2a7c/lcompilers/lpython/issues/2677 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5435333039f9ddb0ce8b020bf657498ec0fce63549ea42b2756eca82f5fd2a7c/lcompilers/lpython/issues/2677 |
| og:image:alt | The value of sep is ignored while printing when two adjacent values are strings. print("a", "b", "c", "d", "e", sep="-") (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./ex... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kmr-srbh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/lcompilers/lpython git https://github.com/lcompilers/lpython.git |
| octolytics-dimension-user_id | 96538276 |
| octolytics-dimension-user_login | lcompilers |
| octolytics-dimension-repository_id | 442864346 |
| octolytics-dimension-repository_nwo | lcompilers/lpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 442864346 |
| octolytics-dimension-repository_network_root_nwo | lcompilers/lpython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width