mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
* Got entirely rid of path.py.
* Many modules: fixes for new, stricter, argument passing rules (most changes were automatic ones -- not all of this is tested!). * gwin.py: now uses mainloop.py for its main loop and window admin. * mainloop.py: always call dispatch() with event as a tuple! * Fix bug in pdb's 'clear' command -- don't set the bpt but clear it!
This commit is contained in:
parent
a8993cfe16
commit
89a78697b8
41 changed files with 208 additions and 228 deletions
|
@ -13,7 +13,7 @@ class formatter:
|
|||
# Pass the window's drawing object, and left, top, right
|
||||
# coordinates of the drawing space as arguments.
|
||||
#
|
||||
def init(self, (d, left, top, right)):
|
||||
def init(self, d, left, top, right):
|
||||
self.d = d # Drawing object
|
||||
self.left = left # Left margin
|
||||
self.right = right # Right margin
|
||||
|
@ -50,10 +50,10 @@ class formatter:
|
|||
# of the current font's space width.
|
||||
# (Two variations: one without, one with explicit stretch factor.)
|
||||
#
|
||||
def addword(self, (word, spacefactor)):
|
||||
def addword(self, word, spacefactor):
|
||||
self.addwordstretch(word, spacefactor, spacefactor)
|
||||
#
|
||||
def addwordstretch(self, (word, spacefactor, stretchfactor)):
|
||||
def addwordstretch(self, word, spacefactor, stretchfactor):
|
||||
width = self.d.textwidth(word)
|
||||
if width > self.avail_width:
|
||||
self._flush(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue