>Oh, and, a question: does anyone know what the following code does?
http://getpaid.googlecode.com/svn/getpaid.core/trunk/src/getpaid/core/options.py >Thanks for any pointers. :-) I think it will store "options" on any peristent object. Objects are described by zope.schema interfaces. PersistentBag provides dictionary-like look up for these options. It creates some kind of persistent class in run-time to handle everything. It provides value loop-up by zope.schema field object or field name. It also has support for "sections" meaning that the same annotations object can store options for several sections. E.g. one section per each checkout wizard page. Too much magic and goes above human mind, I think. That code seriously needs some comments, but I am pretty sure only the original author is able to describe what is going on which makes the code effectively useless to everyone else :) Unless we can get touch with the orignal author to comment the code, I recommend it is scrapped and something more well documented is used instead. Run-time class generation is very, very, evil. In checkout process, there is difference between transient options and persistent options. Mixin these two will result to hard to understand exceptions when data is being serialized to ZODB (something about __getstate__). -Mikko --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~---
