

3·
11 days agoThe main two reasons that I can think of to include this even when you have no intention of importing this as a library are:
- For unit testing you will need to import as a module.
- Sometimes I will run a python interactive interpreter and then import my script so that I can do some manual testing without needing to change my main function or if stmt.
I’m not sure how many people know this but there is good reason why (at least on android) giving Bluetooth permissions also requires location permissions.
The basic concept is that given enough Bluetooth data an app can pinpoint your location accurately anyways. So the android devs decided that they would just require any app that wanted Bluetooth data would also need to require access to location. That way users would be indirectly informed of the dangers.
Why not just a pop-up to inform of the danger? Probably because most users will click past that warning and not read it.