MCPcopy Create free account
hub / github.com/EasyIME/PIME / get_old_value

Method get_old_value

python/python3/tornado/util.py:387–397  ·  view source on GitHub ↗

Returns the old value of the named argument without replacing it. Returns ``default`` if the argument is not present.

(
        self, args: Sequence[Any], kwargs: Dict[str, Any], default: Any = None
    )

Source from the content-addressed store, hash-verified

385 raise
386
387 def get_old_value(
388 self, args: Sequence[Any], kwargs: Dict[str, Any], default: Any = None
389 ) -> Any:
390 """Returns the old value of the named argument without replacing it.
391
392 Returns ``default`` if the argument is not present.
393 """
394 if self.arg_pos is not None and len(args) > self.arg_pos:
395 return args[self.arg_pos]
396 else:
397 return kwargs.get(self.name, default)
398
399 def replace(
400 self, new_value: Any, args: Sequence[Any], kwargs: Dict[str, Any]

Callers 3

test_omittedMethod · 0.80
test_positionMethod · 0.80
test_keywordMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 3

test_omittedMethod · 0.64
test_positionMethod · 0.64
test_keywordMethod · 0.64