pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MagicStack/MagicPython/commit/2780782a60733a07cae933a9c70eb276751ae5fb

" /> Add '%b' as a valid percent-format (PEP 461). · MagicStack/MagicPython@2780782 · GitHub
Skip to content

Commit 2780782

Browse files
committed
Add '%b' as a valid percent-format (PEP 461).
Issue #125.
1 parent fb56c6a commit 2780782

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

grammars/MagicPython.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ repository:
925925
[-+#0 ]*
926926
(\\d+|\\*)? (\\.(\\d+|\\*))?
927927
([hlL])?
928-
[diouxXeEfFgGcrsa%]
928+
[diouxXeEfFgGcrsab%]
929929
)
930930
931931
'''

grammars/MagicPython.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@
14191419
[-+#0 ]*
14201420
(\d+|\*)? (\.(\d+|\*))?
14211421
([hlL])?
1422-
[diouxXeEfFgGcrsa%]
1422+
[diouxXeEfFgGcrsab%]
14231423
)
14241424
</string>
14251425
<key>captures</key>

grammars/src/MagicPython.syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ repository:
777777
[-+#0 ]*
778778
(\d+|\*)? (\.(\d+|\*))?
779779
([hlL])?
780-
[diouxXeEfFgGcrsa%]
780+
[diouxXeEfFgGcrsab%]
781781
)
782782
captures:
783783
'1': {name: constant.character.format.placeholder.other.python}

test/strings/format16.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
a = b'%b' % b'foo'
2+
3+
4+
5+
a : source.python
6+
: source.python
7+
= : keyword.operator.assignment.python, source.python
8+
: source.python
9+
b : source.python, storage.type.string.python, string.quoted.binary.single.python
10+
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
11+
%b : constant.character.format.placeholder.other.python, meta.format.percent.python, source.python, string.quoted.binary.single.python
12+
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
13+
: source.python
14+
% : keyword.operator.arithmetic.python, source.python
15+
: source.python
16+
b : source.python, storage.type.string.python, string.quoted.binary.single.python
17+
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
18+
foo : source.python, string.quoted.binary.single.python
19+
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy