Skip to content

Commit 9f3ae54

Browse files
authored
Merge pull request #4726 from jposada202020/design_guide_string_formatting
adding_string_format_explanation
2 parents f761292 + bba0afa commit 9f3ae54

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/design_guide.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,14 @@ You could other examples if needed featuring different
653653
functionalities of the library.
654654
If you add additional examples, be sure to include them in the ``examples.rst``. Naming of the examples
655655
files should use the name of the library followed by a description, using underscore to separate them.
656+
When using print statements you should use the ``" ".format()`` format, as there are particular boards
657+
that are not capable to use f-strings.
658+
659+
.. code-block:: python
660+
661+
text_to_display = "World!"
662+
663+
print("Hello {}".format(text_to_display))
656664
657665
Sensor properties and units
658666
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)