[Twisted-web] looking for a request.getfirst

Michele Simionato michele.simionato at gmail.com
Mon Oct 17 03:07:03 MDT 2005

I am surprise I don't find a method to extract the value of a field from a
request object. At the moment I am using a helper function

def getfirst(name, request):
    return request.args.get(name, [None])[0]

but is there a better solution?

        Michele Simionato

More information about the Twisted-web mailing list