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

131-return-properties-as-dict #133

Merged
merged 7 commits into from
Jun 19, 2017
Merged

Conversation

raduiordache
Copy link
Contributor

  • added Part.to_dict() method that retrieves the properties of said part inside a dict like this:

{property_name: property_value}

…art inside a dict like this:

{property_name: property_value}
@raduiordache raduiordache changed the title to_dict added and tested 131-return-properties-as-dict Jun 16, 2017
@raduiordache
Copy link
Contributor Author

@jberends - I've done what you were asking for. Not sure how the ReferenceProperty should look like, right now the dict looks like this {reference_property.name: reference_property.value.name}. Another possibility is just to show the either referenced part inside the value, which would mean that the dict() becomes nested.

raduiordache and others added 4 commits June 19, 2017 10:03
- if the property is a part reference one, then the whole part object is returned as a value, as opposed to only the name
- fixed the test
@raduiordache raduiordache merged commit dd2b51a into master Jun 19, 2017
@raduiordache raduiordache deleted the 131-return-properties-as-dict branch June 19, 2017 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants