-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow custom delimiter to be set #11
Conversation
@@ -12,6 +12,9 @@ | |||
#http://www.geonames.org/login | |||
#GEONAMES_USERNAME="yourUserName" | |||
|
|||
# Delimiter for the SQL output | |||
#DELIMITER = " | " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncomment this, and remove the spaces for the default version
Awesome! Two quick comments |
My vote would be to make user-readable errors for both of these issues, and then require the variables to be uncommented. Having two ways to set the default (one is the kwarg and one is the setting) seems like it might otherwise be confusing to the user. |
I agree with you on the first part, but I am not sure what you mean by the second part. The user is not setting it two ways. The kwarg is in the code, meaning the user cannot modify it (as if it is a C/Java program). The setting is the one that is modifiable, but, in my opinion, does not have to be set. Which is why if the delimiter is commented out in the settings file, the code should still work, meaning it would default to what is set in the code. |
The type signature of the function has
Sound good? |
I like that better, but does that mean there will be no default for the delimiter? i.e. just error if you do not have DELIMITER set in the config file? I usually think that a sane default, when it makes sense (which I think it does), is better than a user-readable error. Though i do agree that the signature should not have delimiter argument. |
It's fine to have a default. If you agree, the steps would be:
|
This looks great. Thanks @gnowxilef! |
allow custom delimiter to be set
No description provided.