We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c21753b commit 90ab512Copy full SHA for 90ab512
bpython/line.py
@@ -5,12 +5,17 @@
5
word."""
6
7
from itertools import chain
8
-from collections import namedtuple
9
-from typing import Optional
+from typing import Optional, NamedTuple
10
11
from .lazyre import LazyReCompile
12
13
-LinePart = namedtuple("LinePart", ["start", "stop", "word"])
+
+class LinePart(NamedTuple):
14
+ start: int
15
+ stop: int
16
+ word: str
17
18
19
_current_word_re = LazyReCompile(r"(?<![)\]\w_.])" r"([\w_][\w0-9._]*[(]?)")
20
21
0 commit comments