Skip to content

Commit fe3e0a2

Browse files
committed
cmd: Remove comments about using the string module.
Even though we now have a `string` module, just keep the existing IDENTCHARS definition. - If someone doesn't already have string installed (or aren't otherwise importing it), this would add an extra dependency and more memory used. - If they do, then the resulting concatenated string has to be allocated separately, so there's no gain from using the string.x components. Signed-off-by: Jim Mussared <[email protected]>
1 parent 0a5b635 commit fe3e0a2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python-stdlib/cmd/cmd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,12 @@
5151
completions have also been stripped out.
5252
"""
5353

54-
# import string, sys
55-
import sys # MiroPython doesn't yet have a string module
54+
import sys
5655

5756
__all__ = ["Cmd"]
5857

5958
PROMPT = "(Cmd) "
60-
# IDENTCHARS = string.ascii_letters + string.digits + '_'
59+
# This is equivalent to string.ascii_letters + string.digits + '_'
6160
IDENTCHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
6261

6362

0 commit comments

Comments
 (0)