[Cubicweb] annotating divs with rql and vid

Aurélien Campéas aurelien.campeas at logilab.fr
Fri May 25 14:07:10 CEST 2012


Le 25/05/2012 11:19, Pierre-Yves David a écrit :
> On Thu, May 24, 2012 at 06:35:00PM +0200, Aurélien Campéas wrote:
>> Le 24/05/2012 18:09, Pierre-Yves David a écrit :
>>> On Thu, May 24, 2012 at 05:39:02PM +0200, Sylvain Thénault wrote:
>>> example:
>>>
>>>      class MyView(self):
>>>
>>>          __vargs__ = ('arg1', 'arg2', 'arg3')
>>>
>>>          def call(arg1, arg2='babar', arg3='celestine'):
>>>
>>>              self.arg1 = arg1
>>>              self.arg2 = arg2
>>>              self.arg3 = arg3
>>>
>>
>> what about having the __vargs__ automatically computed by default ?
>
> How would you compute that ?
>

python has this funny thing called "introspection" :-p



More information about the Cubicweb mailing list