[Python-checkins] python/dist/src/Lib/plat-riscos riscospath.py, 1.8.6.2, 1.8.6.3
jhylton@users.sourceforge.net
jhylton at users.sourceforge.net
Sun Oct 16 07:24:33 CEST 2005
- Previous message: [Python-checkins] python/dist/src/Lib/distutils versionpredicate.py, NONE, 1.4.2.2 core.py, 1.50.2.2, 1.50.2.3 dir_util.py, 1.9.2.2, 1.9.2.3 dist.py, 1.55.2.2, 1.55.2.3 msvccompiler.py, 1.49.2.2, 1.49.2.3 sysconfig.py, 1.49.2.4, 1.49.2.5
- Next message: [Python-checkins] python/dist/src/Lib/distutils/command upload.py, NONE, 1.9.2.2 bdist_dumb.py, 1.20.2.2, 1.20.2.3 bdist_rpm.py, 1.29.2.2, 1.29.2.3 bdist_wininst.py, 1.33.2.2, 1.33.2.3 clean.py, 1.14.2.2, 1.14.2.3 install.py, 1.64.2.2, 1.64.2.3 register.py, 1.6.4.2, 1.6.4.3 sdist.py, 1.54.2.2, 1.54.2.3 wininst-6.exe, 1.7.2.1, 1.7.2.2 wininst-7.1.exe, 1.7.2.1, 1.7.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/plat-riscos
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718/Lib/plat-riscos
Modified Files:
Tag: ast-branch
riscospath.py
Log Message:
Merge head to branch (for the last time)
Index: riscospath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-riscos/riscospath.py,v
retrieving revision 1.8.6.2
retrieving revision 1.8.6.3
diff -u -d -r1.8.6.2 -r1.8.6.3
--- riscospath.py 7 Jan 2005 06:58:45 -0000 1.8.6.2
+++ riscospath.py 16 Oct 2005 05:24:00 -0000 1.8.6.3
@@ -168,23 +168,16 @@
return split(p)[0]
-def commonprefix(ps):
- """
- Return the longest prefix of all list elements. Purely string-based; does not
- separate any path parts. Why am I in os.path?
- """
- if len(ps)==0:
- return ''
- prefix= ps[0]
- for p in ps[1:]:
- prefix= prefix[:len(p)]
- for i in range(len(prefix)):
- if prefix[i] <> p[i]:
- prefix= prefix[:i]
- if i==0:
- return ''
- break
- return prefix
+def commonprefix(m):
+ "Given a list of pathnames, returns the longest common leading component"
+ if not m: return ''
+ s1 = min(m)
+ s2 = max(m)
+ n = min(len(s1), len(s2))
+ for i in xrange(n):
+ if s1[i] != s2[i]:
+ return s1[:i]
+ return s1[:n]
## File access functions. Why are we in os.path?
- Previous message: [Python-checkins] python/dist/src/Lib/distutils versionpredicate.py, NONE, 1.4.2.2 core.py, 1.50.2.2, 1.50.2.3 dir_util.py, 1.9.2.2, 1.9.2.3 dist.py, 1.55.2.2, 1.55.2.3 msvccompiler.py, 1.49.2.2, 1.49.2.3 sysconfig.py, 1.49.2.4, 1.49.2.5
- Next message: [Python-checkins] python/dist/src/Lib/distutils/command upload.py, NONE, 1.9.2.2 bdist_dumb.py, 1.20.2.2, 1.20.2.3 bdist_rpm.py, 1.29.2.2, 1.29.2.3 bdist_wininst.py, 1.33.2.2, 1.33.2.3 clean.py, 1.14.2.2, 1.14.2.3 install.py, 1.64.2.2, 1.64.2.3 register.py, 1.6.4.2, 1.6.4.3 sdist.py, 1.54.2.2, 1.54.2.3 wininst-6.exe, 1.7.2.1, 1.7.2.2 wininst-7.1.exe, 1.7.2.1, 1.7.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list