lordmauve / adventurelib

A minimal library for writing text adventure games in Python 3
https://adventurelib.readthedocs.io/
MIT License
153 stars 42 forks source link

@when decorator fails to catch duplicate identifiers #18

Closed lordmauve closed 5 years ago

lordmauve commented 5 years ago

This kind of usage will not cause an exception in adventurelib; it will match and simply throw away a term:

@when('use ITEM on ITEM') 
def f(item): 
    pass

Instead an exception should be raised when defining a function with a name collision like this.