You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "kparzysz-quic (via GitHub)" <gi...@apache.org> on 2023/05/31 13:34:19 UTC

[GitHub] [tvm] kparzysz-quic commented on pull request #14990: [IR,TE,TIR] Use f-strings for string formatting, NFC

kparzysz-quic commented on PR #14990:
URL: https://github.com/apache/tvm/pull/14990#issuecomment-1570248850

   F-strings embed the expressions into the string itself, unlike `%` and `format`, which separate them from the string.  This typically makes f-strings more compact and easier to read.  This can be a judgment call sometimes and I tried not to sacrifice readability if the existing code was clearer than f-strings.
   
   Maybe a small bonus for moving away from `%` is that `%` uses different format specification from `format` and f-strings.  The latter two use the same one, so that helps with consistency a little bit.
   
   I created the first PR not knowing how it will be received, but since the reception was positive, I decided to keep going.


-- 
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