[Zope-Checkins] CVS: Zope/lib/python/AccessControl - Permission.py:1.9 PermissionMapping.py:1.11
Andreas Jung
andreas@zope.com
Thu, 13 Dec 2001 09:24:27 -0500
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv8024
Modified Files:
Permission.py PermissionMapping.py
Log Message:
merge from 2.5 branch (string methods)
=== Zope/lib/python/AccessControl/Permission.py 1.8 => 1.9 ===
name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an,
map(chr,range(256)))
-name_trans=string.maketrans(string.join(name_trans,''), '_'*len(name_trans))
+name_trans=string.maketrans(''.join(name_trans), '_'*len(name_trans))
def pname(name, translate=string.translate, name_trans=name_trans):
return '_'+translate(name,name_trans)+"_Permission"
=== Zope/lib/python/AccessControl/PermissionMapping.py 1.10 => 1.11 ===
# We want to make sure that any non-explicitly set methods are
# private!
- if name[:1]=='_' and name[-11:]=="_Permission": return ''
+ if name.startswith('_') and name.endswith("_Permission"): return ''
raise AttributeError, name
PermissionMapper=PM