4
5
6@register.tag(name="evaluate")
7def do_evaluate(parser, token): 8 """tag usage {% evaluate object.textfield %}"""
9 try:
10 _unused_tag_name, variable = token.split_contents()
51
52
53@register.tag
54def get_objects(parser, token):55 """
56 Get the last N of an Object.
57
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42