benmoran56 / esper

An ECS (Entity Component System) for Python
MIT License
544 stars 69 forks source link

Rename 'delete_component' to 'remove_component' #17

Closed SpotlightKid closed 8 years ago

SpotlightKid commented 8 years ago

The pairing of add/remove (components) vs create/delete (entities) seems more logical to me semantically.

Also do not suppress KeyError in delete_entity and remove_component, which:

SpotlightKid commented 8 years ago

Just a suggestion. I think it's more intuitive this way.

benmoran56 commented 8 years ago

I've considered this. My initial thoughts were that when you delete an entity, it's truely gone. Components and Processors on the other hand, might be instanced before adding to the World. I probably should have changed this earlier, so I will merge your pull request. It's probably better to fix it now before many people use the library :)

The exception changes are looking very nice. The code is a lot cleaner as well. Thank you for your work on this.