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

Dependencies: support more pythons and begin storing dependency info in more convenient way #254

Merged

Conversation

ceball
Copy link
Member

@ceball ceball commented Aug 28, 2018

  • Support python 2.7 and python3 <3.6
  • Keep list of watched methods on class (avoids having to search all attributes at instantiation time)

(Includes restoring more explicit args for depends().)
@ceball ceball requested a review from philippjfr August 28, 2018 11:35
@philippjfr
Copy link
Member

This looks great, ready to merge?

@ceball
Copy link
Member Author

ceball commented Aug 28, 2018

yes (the TODOs are part of the overall PR; will turn them into issues when that PR is merged)

@philippjfr philippjfr merged commit 7a44282 into param_mthd_deps_simplified Aug 28, 2018

# TODO regarding _attrib_name, _owner: what if someone re-uses
# a parameter object across different classes? we should raise
# an error if attrib name,owner already set
Copy link
Member

@jbednar jbednar Aug 28, 2018

Choose a reason for hiding this comment

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

Raising an error sounds good, and the message could tell people how to avoid the message (by cloning the Parameter object somehow before using it in a new class).

I'm trying to figure out how to make it reasonable to add an _owner_instance slot, but it ties my brain in knots. Basically, I want to be able to ask a Parameterized instance for an object that has all the information in the Parameter, plus a pointer to the actual instance so that the value can be accessed. Yet there's only one Parameter object per class, not per instance, so I guess it would have to be a copy of the Parameter object? And then it wouldn't be the one that actually applies to this object. So I guess that before having _owner_instance, we'd first have to set up allowing a local instance copy of the Parameter to override the class's Parameter, at which point the real Parameter just for this instance could be returned with _owner_instance filled in?

@philippjfr philippjfr deleted the param_mthd_deps_simplified_fixups branch September 27, 2018 21:34
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.

None yet

3 participants