Why does pyb.SPI.init() take a nondefaulted prescaler?
Posted: Wed May 30, 2018 4:52 pm
According to https://docs.micropython.org/en/latest/ ... b.SPI.html the pyb.SPI init() function takes a prescaler parameter with no default value. It appears to work if none is provided (which I find a little confusing; shouldn't Python require a parameter for which no default value is provided? I realize there is a bare asterisk requiring named instead of positional args, but that shouldn't allow discarding a nondefaulted arg entirely), but even if it does work, I'm curious why no default is included when there is a default for practically every other parameter to that function? It feels like the docs don't reflect the actual underlying code (i.e., that some default actually is provided by the code even though the docs don't show it), but since the docs are surely machine generated, I can't believe that's the case.
Thanks.
Thanks.