File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,25 @@ changed using the third argument as follows::
203203 foo : bar
204204 bar : baz
205205
206+ Numeric Literals
207+ ................
208+
209+ Long numeric literals, being integer, float or hexadecimal, are known for their
210+ poor readability in code and configuration files. That's why YAML files allow to
211+ add underscores to improve their readability:
212+
213+ .. code-block :: yaml
214+
215+ parameters :
216+ credit_card_number : 1234_5678_9012_3456
217+ long_number : 10_000_000_000
218+ pi : 3.14159_26535_89793
219+ hex_words : 0x_CAFE_F00D
220+
221+ During the parsing of the YAML contents, all the ``_ `` characters are removed
222+ from the numeric literal contents, so there is not a limit in the number of
223+ underscores you can include or the way you group contents.
224+
206225Advanced Usage: Flags
207226---------------------
208227
You can’t perform that action at this time.
0 commit comments