On Nov 16, 12:01 am, Matt McClanahan <[EMAIL PROTECTED]>
wrote:
> On Nov 15, 8:51 pm, Steve Potter <[EMAIL PROTECTED]> wrote:
>
> > It just seem that there should be a better way of doing this. I was
> > thinking about a method that would perform the test for me and return
> > either the
On Nov 15, 8:51 pm, Steve Potter <[EMAIL PROTECTED]> wrote:
> It just seem that there should be a better way of doing this. I was
> thinking about a method that would perform the test for me and return
> either the contents or a blank string.
Often times, when it seems like something should
>I am finding myself writing a lot of code that looks like this:
>
>if 'REMOTE_ADDR' in request.META:
>remote_address = request.META['REMOTE_ADDR']
>else:
>remote_address = ''
You can slurp this into one line (though it's the same check) like so:
remote_address =
3 matches
Mail list logo