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

Dict-like getting of instances from Context #208

Closed
mottosso opened this issue Jul 11, 2015 · 1 comment
Closed

Dict-like getting of instances from Context #208

mottosso opened this issue Jul 11, 2015 · 1 comment

Comments

@mottosso
Copy link
Member

Goal

Simplify and improve performance of getting individual instances from a context.

context = pyblish.api.Context()
context.create_instance("MyInstanceA")
context.create_instance("MyInstanceB")

assert context["MyInstanceA"].name == "MyInstanceA"
assert context["MyInstanceB"].name == "MyInstanceB"
assert context.get("MyInstanceA").name == "MyInstanceA"
assert context.get("MyInstanceB").name == "MyInstanceB"
assert context[0].name == "MyInstanceA"
assert context[1].name == "MyInstanceB"
@tokejepsen
Copy link
Member

+1

@mottosso mottosso mentioned this issue Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants