On Wed, Sep 29, 2010 at 3:03 PM, Sidnei da Silva
<[email protected]> wrote:
> On Tue, Sep 28, 2010 at 8:02 PM, Robert Collins
> <[email protected]> wrote:
>> Specifically, rather than a regular object, they are pseudo stateless
>> - classes are used, and helpers that contain some magic code get used.
>
> Just to clarify: I think that's a common misunderstanding. The only
> contract for layers is that they have 'setUp'/'tearDown' methods and
> __bases__ and it isn't specified anywhere that they must be a class.
> We're happily using objects in Landscape, we just happen to set the
> __bases__ attribute of those objects to 'fake' layer inheritance.

http://docs.python.org/library/stdtypes.html specifies that __bases__
is the base class tuple for a class; sure you work around this but the
design *intends* to use classes, and *intends* to call separate base
class methods separately without the usual python (must call super
explicitly) logic occuring.

The difference between 'requires setUp, tearDown and __bases__' and
'classes' is inconsequential IMNSHO.

-Rob

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to