Title: assignment expressions in while loop · Issue #45 · natural/java2python · GitHub
Open Graph Title: assignment expressions in while loop · Issue #45 · natural/java2python
X Title: assignment expressions in while loop · Issue #45 · natural/java2python
Description: Hello, I'll put some feed back here to some missing conversions. I hope it can be useful. A java code like this: int amountRead; while((amountRead = is.read(buffer, 0, 1024))!= -1) { decoded.write(buffer, 0, amountRead); } decoded.flush(...
Open Graph Description: Hello, I'll put some feed back here to some missing conversions. I hope it can be useful. A java code like this: int amountRead; while((amountRead = is.read(buffer, 0, 1024))!= -1) { decoded.write(...
X Description: Hello, I'll put some feed back here to some missing conversions. I hope it can be useful. A java code like this: int amountRead; while((amountRead = is.read(buffer, 0, 1024))!= -1) { decoded.wr...
Opengraph URL: https://github.com/natural/java2python/issues/45
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"assignment expressions in while loop","articleBody":"Hello,\n\nI'll put some feed back here to some missing conversions. I hope it can be useful.\n\nA java code like this:\n\n``` java\nint amountRead;\nwhile((amountRead = is.read(buffer, 0, 1024))!= -1)\n{\n decoded.write(buffer, 0, amountRead);\n}\ndecoded.flush();\n```\n\nis converted to this python one:\n\n``` python\namountRead = int()\nwhile (amountRead = is_.read(buffer_, 0, 1024)) != -1:\n decoded.write(buffer_, 0, amountRead)\ndecoded.flush()\n```\n\nThe problem is that Python doesn't allow assignment expressions to be used inside the conditional expression of the loop. Check here: [expression vs assignments in while loop in python and Java?](http://stackoverflow.com/questions/20847697/expression-vs-assignments-in-while-loop-in-python-and-java) \n","author":{"url":"https://github.com/yucer","@type":"Person","name":"yucer"},"datePublished":"2016-09-27T09:03:20Z","url":"https://github.com/natural/java2python/issues/45"}
| 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:52f8bc72-f86b-ae67-8e1d-386500b180ee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0EE:3AAB10:D2AD3:12A8B2:6AFCBA53 |
| html-safe-nonce | 07ce36ac44e3cb1782f02eb5771e92e738151d350b441e4f88ba679539a25358 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEVFOjNBQUIxMDpEMkFEMzoxMkE4QjI6NkFGQ0JBNTMiLCJ2aXNpdG9yX2lkIjoiNTQ2MjQ0ODMxNjMzMzQ3MjMzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8270dfb786d7fbc73a6a6bed6527b93b773ecbc68ec276c9ffcd7cd911a30925 |
| hovercard-subject-tag | issue:179435580 |
| 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/natural/java2python/45/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93539ca8438ef88cf2f5bed1f8ada2e7690c1650a8f417c1e9885effd95bdf64/natural/java2python/issues/45 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93539ca8438ef88cf2f5bed1f8ada2e7690c1650a8f417c1e9885effd95bdf64/natural/java2python/issues/45 |
| og:image:alt | Hello, I'll put some feed back here to some missing conversions. I hope it can be useful. A java code like this: int amountRead; while((amountRead = is.read(buffer, 0, 1024))!= -1) { decoded.write(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yucer |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d |
| turbo-cache-control | no-preview |
| go-import | github.com/natural/java2python git https://github.com/natural/java2python.git |
| octolytics-dimension-user_id | 146692 |
| octolytics-dimension-user_login | natural |
| octolytics-dimension-repository_id | 3298542 |
| octolytics-dimension-repository_nwo | natural/java2python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3298542 |
| octolytics-dimension-repository_network_root_nwo | natural/java2python |
| 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 | 5410e4bebd3e45b138c853ecef3992279d86d5af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width