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

Add a "default" parameter #5

Closed
ncoghlan opened this issue Oct 9, 2012 · 1 comment · Fixed by #9
Closed

Add a "default" parameter #5

ncoghlan opened this issue Oct 9, 2012 · 1 comment · Fixed by #9
Milestone

Comments

@ncoghlan
Copy link

ncoghlan commented Oct 9, 2012

While I don't think the "pred" parameter is useful, adding a "default=None" optional parameter would be very handy (for the same reasons it is handy in various other getter operations)

@hynek
Copy link
Owner

hynek commented Oct 9, 2012

I agree! This will go into 1.1.

(NB since “first” returns None instead of blowing up, you can always do first(…) or yourdefault but you’re right that one of the points of “first” is to reduce clutter like that. :)

This was referenced Oct 12, 2012
@hynek hynek closed this as completed in 1ce9372 Oct 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants