MCPcopy
hub / github.com/tornadoweb/tornado / decode_argument

Method decode_argument

tornado/test/web_test.py:695–702  ·  view source on GitHub ↗
(self, value, name=None)

Source from the content-addressed store, hash-verified

693
694class DecodeArgHandler(RequestHandler):
695 def decode_argument(self, value, name=None):
696 if type(value) is not bytes:
697 raise Exception("unexpected type for value: %r" % type(value))
698 # use self.request.arguments directly to avoid recursion
699 if "encoding" in self.request.arguments:
700 return value.decode(to_unicode(self.request.arguments["encoding"][0]))
701 else:
702 return value
703
704 def get(self, arg):
705 def describe(s):

Callers

nothing calls this directly

Calls 1

to_unicodeFunction · 0.90

Tested by

no test coverage detected