Wouldn't it make more sense to write `def some_function(a in (1, 2,3), b):`, meaning `a in (1, 2,3)` must be true? Similarly you could have `def some_function(a > 0):` to mean `a > 0` must be true.

On Sat, Jun 13, 2020 at 2:55 PM artem6191 <artem129871@gmail.com> wrote:
This operator will allow to send arguments to function only by certain values.
Example:

def some_function(a > (1, 2,3), b):
   # Some code
some_function(1, 2)
some_function(4, 2) # Error "Value '4' is not allowed for argument 'a'"
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2W4IRHQAUX4QS7CG3QQ3MQ2K5IMNJQYC/
Code of Conduct: http://python.org/psf/codeofconduct/