-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Replace ObjectSelector with Selector #497
Conversation
Note that ListSelector, FileSelector, and MultiFileSelector all still use the convention from ObjectSelector where the first argument is the default value, not the objects list, and where the default value must be specified since it won't be computed from the objects list. Changing those things breaks backwards compatibility, so shouldn't be done lightly. |
Added a fix for #307 . |
# existing objects, therefore instantiate is False by default. | ||
def __init__(self, default=None, objects=None, instantiate=False, | ||
def __init__(self, objects=None, default=None, instantiate=False, |
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.
This order is indeed better but in theory could break anyone passing in the arguments by position. This causing an issue is very unlikely in practice as I don't think I've ever seen that style of signature so overall I consider this an improvement.
Looks good! Sorry for not reviewing before merge but I don't see anything I would have objected to (other than a minor typo fix that I'll push a PR for now). |
Fixes #493