Replies: 5 comments
-
I was just going to open a discussion on the same topic :p . I agree with this, and let's follow one approach, whichever is cleaner. |
Beta Was this translation helpful? Give feedback.
-
Yes..The formatted string approach reduces the code length and is also not a sore sight for eyes as compared to other formats. One can easily understand as to what would be logged easily. |
Beta Was this translation helpful? Give feedback.
-
I think we need to document these python code level considerations in a doc as standards. Just issues might be hard to refer to.. |
Beta Was this translation helpful? Give feedback.
-
Yeah let's make a standards.md file and put these format rules. It's hard to just go through the issues. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
The usual way of formatting string in python had been
("sample %s" %(val) )
or("sample %s", val)
But the cleaner way of doing it is using the formatted strings.
(f"sample {val}")
. I propose we use this format across the project rather than having multiple different ways of formatting our string.For reference : https://docs.python.org/3.6/reference/lexical_analysis.html#formatted-string-literals
Beta Was this translation helpful? Give feedback.
All reactions