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

Cannot assign attributes on Rect object #11

Closed
lordmauve opened this issue Jun 4, 2015 · 2 comments
Closed

Cannot assign attributes on Rect object #11

lordmauve opened this issue Jun 4, 2015 · 2 comments

Comments

@lordmauve
Copy link
Owner

Originally reported by: Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve)


Actor objects may have extra attributes. Rect objects, on the other hand, are C objects and therefore don't automatically have an instance dictionary.

We could include a pure Python Rect class that can have extra attributes assigned.


@lordmauve
Copy link
Owner Author

Original comment by first last (Bitbucket: JustAMan, GitHub: JustAMan):


Cannot ZRect (from rect.py) be used for that? It is pure-Python object that can have extra attributes.

If having two rects is confusing it could be easily be monkey-patched so that "from pygame import Rect" actually yields ZRect class :)

@lordmauve
Copy link
Owner Author

Original comment by Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve):


New: thin Rect subclass te enable setting attributes on a Rect (closes #11)

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

1 participant