docs: micropython.viper: number of arguments in functions #11553
Replies: 3 comments 1 reply
-
Already in MP 1.14 apparently there is no limit any longer. Just tested 13 arguments.
gives:
i.e. it works as 'not yet' :-) expected. Was it stated in some version announcement that the restriction is lifted? |
Beta Was this translation helpful? Give feedback.
-
Wow! Thanks for that. I've been working round the four arg limit for years... You can view the emitted bytecode with the Unix build: & micropython -v -v foo.py In the case of a Viper function there is no bytecode (native code is emitted), but you can see the difference with and without the Viper decorator. |
Beta Was this translation helpful? Give feedback.
-
I went spelunking and turns out that limitation was removed nearly five years ago! (I didn't know either!) Created #11564 to fix the docs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
From the official doc https://docs.micropython.org/en/v1.9.3/pyboard/reference/speed_python.html#the-viper-code-emitter
Well, I am using a function with 7 arguments... and it works.
I tested the crc calculation with 19 different polynomials, input data "123456789" and the expected results published here
https://crccalc.com/
Mmh to be sure, how do you suggest to check if the function is running optimized or not?
(preferably a method not depending on execution times).
Is it the documentation up-to-date?
Beta Was this translation helpful? Give feedback.
All reactions