Geir Bækholt wrote:
if the method was called directly from somewhere , not through the web..
- so that , if you for instance are adding objects programmatically, will not be redirected to manage_main...
Also then, the absense of REQUEST can be tested with just 'if REQUEST'?! Obviously I'm still not making clear what I want to know: - 'None' compares to a boolean false - 'def something(self, REQUEST=None):' gives REQUEST the value None, if it is omitted - inside the function, REQUEST is either a Request instance (boolean true) or 'None' (boolean false), so testing for 'if REQUEST is not None:' is equivalent to 'if REQUEST:' As 'if REQUEST' is shorter than '.. is not None', why not use it instead? Like this: def something(self, REQUEST=None): # do actions if REQUEST: # redirect to ... It's equivalent to testing for an empty string: why test for the empty string like this: if s != '' when you know s is a string, so you can just do: if s: - Willem