Skip to content
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

adding getboolean #1

Merged
merged 3 commits into from
Jun 12, 2014
Merged

adding getboolean #1

merged 3 commits into from
Jun 12, 2014

Conversation

irontablee
Copy link
Collaborator

No description provided.

if ret.lower() not in cls.config._boolean_states:
raise ValueError, 'Not a boolean: %s' % str(ret)
return cls.config._boolean_states[ret.lower()]

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so this is what I was wondering. Shouldn't this function just be:

def getboolean(*args, **kargs):
   return bool(C.get(*args, **kwargs))

And then by extension couldn't we implement this as get_bool and then just do some magic to generate the function?

charsmith added a commit that referenced this pull request Jun 12, 2014
@charsmith charsmith merged commit 9cd7bda into charsmith:master Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants