Looking at the iRobot Create3 Python examples, led me down an unexpected “That is Python?” adventure. The example used Python syntax I had never seen before:
async def x():
r = await x()
showing that I had never explored the Python “standard library” asyncio.
And in reading about asyncio on Real Python I discovered another Python syntax I was totally unready for - type hinting:
async def makerandom(idx: int, threshold: int = 6) -> int:
...
return i
I have at times run into situations where I thought I was putting an integer into a variable only to find that it was a string, or vice versa - I don’t remember exactly but an exception clued me into needing to enforce a cast in that particular situation. Now I see that in recent Python they have introduced “type hints”.
I already knew Python2 was larger than I could learn by osmosis (reading other folks code), but everyday I discover a new something in Python 3.x; Often x is one greater than the version I have installed and thinking I am comfortable with.
So when @Jimrh says:
I can certainly feel his pain and exclaim “That is Python?”
(I should add that the introduction of “closures” caused me to run from JavaScript. I’m still trying to avoid the fact that “Real Python Programers” love lambda.)