thomasborgen / storage-bucket

For easy GCP Storage Bucket interaction
MIT License
6 stars 0 forks source link

Should our delete_file and delete_bucket functions return True on success? #30

Open thomasborgen opened 4 years ago

thomasborgen commented 4 years ago

its a good question, we used to have some of these return True, but the google library returns None, and we do too since as long as there are no exception raised its 100% deleted. Also because it will never return False its not really a boolean return value.

@ChameleonTartu What do you think?

ChameleonTartu commented 4 years ago

@thomasborgen I think you are right. There is no need in True if we don't have false. In the meantime, should we document this behaviour in the docstrings?

The confusing part with None from my perspective, person who uses code wouldn't know if a function is sync/async, so None in this case may mean success or function may continue doing its job. Do you sync async is a valid point here?