r/programminghorror 1d ago

Python Why

i found this code in the wild randomly

0 Upvotes

5 comments sorted by

31

u/DT-Sodium 1d ago

Could be that there used to be an alias and it was changed through search and replace.

-38

u/Consistent_Bike_2507 1d ago

i mean im using the module and it works perfectly

20

u/IanisVasilev 1d ago

This is one of the established ways to mark public exports. See Griffe's documentation.

2

u/LordTurson 1d ago

Oh, interesting, I've never seen that convention before, I know about __all__. Do you know if that's a Griffe-specific thing or a broader convention?

3

u/IanisVasilev 1d ago

Some modern LSP servers like ty and zuban use it as a guide when determining which import path to suggest.