Problem with magic global scoping

I am relatively new to python, I am not sure if this is an issue with python or fastai library or what, but it’s a pattern I see all the time.

What is that? one_param? It’s not scoped anywhere, not attached to any class, and (in this case) its a pretty ambiguous term for searching.

I always wish, when I see things like tsfms = get_transforms() it would be something like tsfms = fastai.get_transforms()

Maybe its just something so pythonic it’s lost on me?

Any proper code editor will send you to the function definition. For instance in VS code, you just have to press F12.
If you are in a notebook, typing the name of a function in a cell will tell you where it comes from. Since it’s a fastai function, typing show_doc(one_param) will pop the documentation with a link to the source code.

That’s fair. I was exploring it through github as I often do. I will definitely keep it in mind that it’s expected to be understood in the context of a proper ide.