Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Flashback to a very common question about relative imports in python that had mostly outdated answers, or very hacky non-solutions but that kept being referenced in newer threads. You actually had to scroll way down to get a reasonable answer. Even then, there was so much confusion and "works for me if I just set the path manually (lol)" or "add __init__.py in this folder" , "no actually don't remove __init__!". Which okay I guess sometimes questions have multiple answers (though the answer way down the page was objectively correct!) ... but then why close newer questions if past answers were messy and very non universal?


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: