-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Shane Hathaway wrote: > Philipp von Weitershausen wrote: >> Shane Hathaway wrote: >>> However, I'm wondering what browser:page does to make something >>> publishable, that browser:view doesn't do. >> It creates a new class with an extra mix-in class that has a >> browserDefault method which in turn points to the template, method or >> __call__ attribute. > > If you don't mind explaining, I'd like to understand why this design was > chosen. Why does it create a new class instead of creating an instance > of a class? It seems like it's using advanced Python (class generation) > where ordinary Python (a class instance) will do just as well. > > If I'm not missing something important, I may try to rewrite that code.
I *think* that the design predated the ability of the security machinery to use an instance-specific attriubute for the checker, and so the only feasible way to get the configuration-specified security settings was to generate code. Either that, or the implementor didn't understand how the checker machinery worked, and just "made it work." 'pushpage' has a view directive which uses instances, rather than generated classes: http://agendaless.com/Members/tseaver/software/pushpage Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFXU6y+gerLs4ltQ4RAmEzAKDDATRzC8AN94myLUBAghrYAUvuQACgoo/5 AF8Yf4uOzdLSv6aYtGzIwEQ= =2tLN -----END PGP SIGNATURE----- _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com