Skip to content

Commit f73668c

Browse files
author
Yury Selivanov
committed
Add PEP 484 examples
1 parent bb40a06 commit f73668c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

misc/example.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ async def coroutine(db:aio_db.DatabaseConnection) -> List[str]:
2323
print('Result: {result!r}'.format(result=
2424
await db.query(...)))
2525

26+
mapping = None # type: Dict[int, Any] # PEP 484
27+
2628
# a regular expression
27-
get_regex = lambda: re.compile(
29+
get_regex = lambda: re.compile( # type: ignore
2830
r"""\A
2931
word
30-
(?: # a comment
32+
(?: # a comment
3133
(?P<fill>.)?
32-
(?P<align>[<>=^]) (?# another comment)
34+
(?P<align>[<>=^]) (?# another comment)
3335
)?
3436
another word\.\.\.
3537
(?:\.(?P<precision>0|(?!0)\d+))?
@@ -42,6 +44,4 @@ async def coroutine(db:aio_db.DatabaseConnection) -> List[str]:
4244
# complex numbers
4345
.10e12 + 2j) @ mat
4446

45-
raw_string = R'''No escapes '\' in this \one'''
46-
47-
return NotImplemented
47+
return R'''No escapes '\' in this \one'''

0 commit comments

Comments
 (0)