Description
Hi
Using python-osc in my app I noticed a strange behavior related to the dispatcher. When I map a function to a path without using wildcards in the path, e.g. this way:
dispatcher.map('/qwer/asdf/zxcv', func)
the function is called obviously only when full path matches. But when I map a string this way:
dispatcher.map('/qwer/*/zxcv', func)
it matches not only all paths like: /qwer/whatever/zxcv, but also such ones like this: /qwer/whatever/zxcvsomethingmore.
I'm not sure whether it is correct mechanism and the problem is lack of my understanding of the OSC protocol or is it a bug. I noticed in the dispatcher's code, that in function handlers_for_addresses, in line 211, there is a variable addr used as a pattern, without added $ sign at the end, while in line 209 the pattern is ended with this sign (added in line 204).
python-osc/pythonosc/dispatcher.py
Line 117 in 66dc211
Activity