File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ Format
329
329
```
330
330
331
331
### General Options
332
- ``` bash
332
+ ``` python
333
333
{< el> :< 10 } # '<el> '
334
334
{< el> :> 10 } # ' <el>'
335
335
{< el> :^ 10 } # ' <el> '
@@ -339,22 +339,22 @@ Format
339
339
340
340
### String Options
341
341
** ` '!r' ` calls object's repr() method, instead of format(), to get a string.**
342
- ``` bash
342
+ ``` python
343
343
{' abcde' ! r:< 10 } # "'abcde' "
344
344
```
345
345
346
- ``` bash
346
+ ``` python
347
347
{' abcde' :.3 } # 'abc'
348
348
{' abcde' :10.3 } # 'abc '
349
349
```
350
350
351
351
### Number Options
352
- ``` bash
352
+ ``` python
353
353
{1.23456 :.3f} # '1.235'
354
354
{1.23456 :10. 3f } # ' 1.235'
355
355
```
356
356
357
- ``` bash
357
+ ``` python
358
358
{ 123456 :10 ,} # ' 123,456'
359
359
{ 123456 :10_ } # ' 123_456'
360
360
{ 123456 :+ 10 } # ' +123456'
@@ -363,7 +363,7 @@ Format
363
363
{- 123456 : } # '-123456'
364
364
```
365
365
366
- ` ` ` bash
366
+ ``` python
367
367
{65 :c} # 'A'
368
368
{3 :08b } # '00000011' -> Binary with leading zeros.
369
369
{3 :0 < 8b } # '11000000' -> Binary with trailing zeros.
You can’t perform that action at this time.
0 commit comments