What is the significance of an array at the end of an __init__.py file?

Viewed 91

I am reading code for a package file (edit: a custom package in a shared repository) with a structure similar to this:

# some_package/__init__.py

from foo import a1
from bar import b1, b2

[
    a1,
    b1,
    b2
]

That is the extent of the file.

Is this array an implicit declaration of the __all__ method?

1 Answers

It is not there for any good reason. Without being a declared variable, it does nothing but waste time. It could be there to delay everything microscopically, but probably not as this could be done in other ways.

Related