mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
Merge Py Idle changes
Rev 1.13 (string methods)
This commit is contained in:
parent
908aece9f7
commit
a287644204
2 changed files with 2 additions and 4 deletions
|
|
@ -12,7 +12,6 @@ XXX TO DO:
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import string
|
|
||||||
import pyclbr
|
import pyclbr
|
||||||
|
|
||||||
# XXX Patch pyclbr with dummies if it's vintage Python 1.5.2:
|
# XXX Patch pyclbr with dummies if it's vintage Python 1.5.2:
|
||||||
|
|
@ -117,7 +116,7 @@ class ModuleBrowserTreeItem(TreeItem):
|
||||||
if sup.module != cl.module:
|
if sup.module != cl.module:
|
||||||
sname = "%s.%s" % (sup.module, sname)
|
sname = "%s.%s" % (sup.module, sname)
|
||||||
supers.append(sname)
|
supers.append(sname)
|
||||||
s = s + "(%s)" % string.join(supers, ", ")
|
s = s + "(%s)" % ", ".join(supers)
|
||||||
items.append((cl.lineno, s))
|
items.append((cl.lineno, s))
|
||||||
self.classes[s] = cl
|
self.classes[s] = cl
|
||||||
items.sort()
|
items.sort()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import time
|
import time
|
||||||
import string
|
|
||||||
import re
|
import re
|
||||||
import keyword
|
import keyword
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
|
|
@ -14,7 +13,7 @@ DEBUG = 0
|
||||||
|
|
||||||
|
|
||||||
def any(name, list):
|
def any(name, list):
|
||||||
return "(?P<%s>" % name + string.join(list, "|") + ")"
|
return "(?P<%s>" % name + "|".join(list) + ")"
|
||||||
|
|
||||||
def make_pat():
|
def make_pat():
|
||||||
kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b"
|
kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue