Commit c1624616 authored by Guido van Rossum's avatar Guido van Rossum

Get rid of arguments named None.

This is a SyntaxWarning in Python 2.3 and will be an error in 2.4.
parent 48e3aaad
......@@ -13,8 +13,8 @@
__doc__='''Support for owned objects
$Id: Owned.py,v 1.18 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.18 $'[11:-2]
$Id: Owned.py,v 1.19 2002/10/01 14:09:46 gvanrossum Exp $'''
__version__='$Revision: 1.19 $'[11:-2]
import Globals, urlparse, SpecialUsers, ExtensionClass
from AccessControl import getSecurityManager, Unauthorized
......@@ -63,7 +63,7 @@ class Owned(ExtensionClass.Base):
getOwner__roles__=()
def getOwner(self, info=0,
aq_get=aq_get, None=None,
aq_get=aq_get,
UnownableOwner=UnownableOwner,
getSecurityManager=getSecurityManager,
):
......@@ -90,7 +90,7 @@ class Owned(ExtensionClass.Base):
changeOwnership__roles__=()
def changeOwnership(self, user, recursive=0,
aq_get=aq_get, None=None,
aq_get=aq_get,
):
"""Change the ownership to the given user. If 'recursive' is
true then also take ownership of all sub-objects, otherwise
......@@ -231,7 +231,7 @@ def absattr(attr):
return attr
def ownerInfo(user,
getattr=getattr, type=type, st=type(''), None=None):
getattr=getattr, type=type, st=type('')):
if user is None:
return None
uid=user.getId()
......
......@@ -13,8 +13,8 @@
__doc__='''Objects that implement Permission-based roles.
$Id: PermissionRole.py,v 1.16 2002/08/14 21:29:07 mj Exp $'''
__version__='$Revision: 1.16 $'[11:-2]
$Id: PermissionRole.py,v 1.17 2002/10/01 14:09:46 gvanrossum Exp $'''
__version__='$Revision: 1.17 $'[11:-2]
_use_python_impl = 0
import os
......@@ -66,7 +66,7 @@ if _use_python_impl:
self._p='_'+string.translate(name,name_trans)+"_Permission"
self._d=default
def __of__(self, parent, None=None, getattr=getattr):
def __of__(self, parent, getattr=getattr):
r=imPermissionRole()
r._p=self._p
r._pa=parent
......@@ -85,7 +85,7 @@ if _use_python_impl:
"""Implement permission-based roles
"""
def __of__(self, parent,tt=type(()),st=type(''),getattr=getattr,None=None):
def __of__(self, parent,tt=type(()),st=type(''),getattr=getattr):
obj=parent
n=self._p
r=None
......
......@@ -13,8 +13,8 @@
__doc__='''Define Zope\'s default security policy
$Id: ZopeSecurityPolicy.py,v 1.20 2002/08/21 19:31:59 shane Exp $'''
__version__='$Revision: 1.20 $'[11:-2]
$Id: ZopeSecurityPolicy.py,v 1.21 2002/10/01 14:09:46 gvanrossum Exp $'''
__version__='$Revision: 1.21 $'[11:-2]
_use_python_impl = 0
......@@ -75,7 +75,7 @@ if _use_python_impl:
self._authenticated=authenticated
def validate(self, accessed, container, name, value, context,
roles=_noroles, None=None, type=type, IntType=type(0),
roles=_noroles, type=type, IntType=type(0),
DictType=type({}), getattr=getattr, _noroles=_noroles,
StringType=type(''),
Containers=SimpleObjectPolicies.Containers,
......
......@@ -11,7 +11,7 @@
#
##############################################################################
"""$Id: DateIndex.py,v 1.7 2002/08/14 22:19:27 mj Exp $
"""$Id: DateIndex.py,v 1.8 2002/10/01 14:09:47 gvanrossum Exp $
"""
from DateTime.DateTime import DateTime
......@@ -84,7 +84,7 @@ class DateIndex(UnIndex):
return returnStatus
def _apply_index( self, request, cid='', type=type, None=None ):
def _apply_index( self, request, cid='', type=type ):
"""Apply the index to query parameters given in the argument
Normalize the 'query' arguments into integer values at minute
......
......@@ -13,7 +13,7 @@
"""Simple column indices"""
__version__='$Revision: 1.14 $'[11:-2]
__version__='$Revision: 1.15 $'[11:-2]
from Globals import Persistent
from Acquisition import Implicit
......@@ -278,7 +278,7 @@ class UnIndex(Persistent, Implicit, SimpleItem):
LOG('UnIndex', ERROR, 'Attempt to unindex nonexistent document'
' with id %s' % documentId)
def _apply_index(self, request, cid='', type=type, None=None):
def _apply_index(self, request, cid='', type=type):
"""Apply the index to query parameters given in the request arg.
The request argument should be a mapping object.
......
......@@ -13,7 +13,7 @@
"""Simple column indices"""
__version__='$Revision: 1.31 $'[11:-2]
__version__='$Revision: 1.32 $'[11:-2]
from Globals import Persistent
from Acquisition import Implicit
......@@ -254,7 +254,7 @@ class UnIndex(Persistent, Implicit):
LOG('UnIndex', ERROR, 'Attempt to unindex nonexistent document'
' with id %s' % documentId)
def _apply_index(self, request, cid='', type=type, None=None):
def _apply_index(self, request, cid='', type=type):
"""Apply the index to query parameters given in the request arg.
The request argument should be a mapping object.
......
......@@ -171,8 +171,7 @@ class NodeWrapper(ParentNode):
def getPreviousSibling(self,
type=type,
sts=StringTypes,
getattr=getattr,
None=None):
getattr=getattr):
"""
The node immediately preceding this node. If
......@@ -243,8 +242,7 @@ class NodeWrapper(ParentNode):
def _get_PreviousSibling(self,
type=type,
sts=StringTypes,
getattr=getattr,
None=None):
getattr=getattr):
return self.getPreviousSibling(type,sts,getattr,None)
......@@ -292,8 +290,7 @@ class Node(ParentNode):
def getPreviousSibling(self,
type=type,
sts=StringTypes,
getattr=getattr,
None=None):
getattr=getattr):
"""
The node immediately preceding this node. If
there is no such node, this returns None.
......@@ -346,8 +343,7 @@ class Node(ParentNode):
def _get_PreviousSibling(self,
type=type,
sts=StringTypes,
getattr=getattr,
None=None):
getattr=getattr):
return self.getPreviousSibling(type,sts,getattr,None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment