[Python-checkins] python/dist/src/Lib UserList.py, 1.21, 1.22 pyclbr.py, 1.31, 1.32

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed Dec 17 15:43:34 EST 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv9388/Lib
Modified Files:
	UserList.py pyclbr.py 
Log Message:
Guido grants a Christmas wish: 
 sorted() becomes a regular function instead of a classmethod.
Index: UserList.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/UserList.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** UserList.py	29 Oct 2003 06:54:42 -0000	1.21
--- UserList.py	17 Dec 2003 20:43:32 -0000	1.22
***************
*** 79,87 ****
 def reverse(self): self.data.reverse()
 def sort(self, *args, **kwds): self.data.sort(*args, **kwds)
- def sorted(cls, iterable, *args, **kwds):
- s = cls(iterable)
- s.sort(*args, **kwds)
- return s
- sorted = classmethod(sorted)
 def extend(self, other):
 if isinstance(other, UserList):
--- 79,82 ----
Index: pyclbr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pyclbr.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** pyclbr.py	1 Dec 2003 20:12:14 -0000	1.31
--- pyclbr.py	17 Dec 2003 20:43:32 -0000	1.32
***************
*** 328,332 ****
 if isinstance(obj, Class):
 print "class", obj.name, obj.super, obj.lineno
! methods = list.sorted(obj.methods.iteritems(), key=itemgetter(1))
 for name, lineno in methods:
 if name != "__path__":
--- 328,332 ----
 if isinstance(obj, Class):
 print "class", obj.name, obj.super, obj.lineno
! methods = sorted(obj.methods.iteritems(), key=itemgetter(1))
 for name, lineno in methods:
 if name != "__path__":


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /