I have a method:
def foo(bar):
# ...
Is there a way to mark bar
as constant? Such as "The value in bar
cannot change" or "The object pointed to by bar
cannot change".
If bar is an inmutable object, bar won't change during the function.
You can also create your own constant object. The recipe here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With