richard-webb-dev / werewolves-site

Small early stages project of a simple part game
0 stars 0 forks source link

__del__() bad practice? #25

Open richard-webb-dev opened 8 years ago

richard-webb-dev commented 8 years ago

Note: current issues may be caused by implementing del() on the classes. This prevents the GC from collecting classes in the case of cyclical references.

del() isn't a nice way of backing up a save(), but I'm inclined to believe it's better than nothing for lazy developers. Perhaps I could implement a diff function and raise a warning when the current state in del() doesn't match the redis state, allowing tracing down of areas where save() isn't being called when it should.

This is part of greater logging that is required.

11

24

richard-webb-dev commented 8 years ago

By using initialisations of objects when required, the del operation shouldn't be required. Kept open for reference as they still need to be deleted.

richard-webb-dev commented 8 years ago

<1 hour