You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "junrushao (via GitHub)" <gi...@apache.org> on 2023/04/02 22:16:57 UTC

[GitHub] [tvm] junrushao opened a new pull request, #14452: [TVMScript][Bugfix] Tuple on the RHS of AssignDoc

junrushao opened a new pull request, #14452:
URL: https://github.com/apache/tvm/pull/14452

   This PR fixes a bug in TVMScript printer handling tuples on the RHS of an assignment, i.e.:
   
   ```python
   ... = (a, b, c)
         ^^^^^^^^^
   ```
   
   The existing  sugar removes the brackets surrounding `(a, b, c)`, which makes it slightly more readable as:
   
   ```python
   ... = a, b, c
   ```
   
   However, it overlooks a possibility where the tuple could be empty or has only one element, i.e.
   
   ```python
   ... = (a, ) // Case 1: The tuple has only one element
   ... = ()    // Case 2: The tuple is empty
   ```
   
   In both cases, removing brackets may lead to wrong outcome.
   
   This patch fixes this bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao merged pull request #14452: [TVMScript][Bugfix] Tuple on the RHS of AssignDoc

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao merged PR #14452:
URL: https://github.com/apache/tvm/pull/14452


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #14452: [TVMScript][Bugfix] Tuple on the RHS of AssignDoc

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14452:
URL: https://github.com/apache/tvm/pull/14452#issuecomment-1493453161

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org