The '=' notation is not a popular method but since it's supported and I
personally like it, I simply wish to be consistent in my code. I expect
to see replies to the effect of "stick with 'default='", and I probably
would if this issue is not considered a bug ;P but in the meantime ...

I was trying to do: 'f1=datetime.date(1944,1,1)' but it doesn't work
(AttributeError: 'str' object has no attribute 'year'). Of course,
'default=datetime.date(1994,1,1)' works just fine. It remains a string,
instead of being converted to a date, as reasonably expected (by me).  

Apparently, this method only works with strings and is ambiguous when
the values you wish to assign needs to be evaluated. 

    form=SQLFORM.factory(
               Field('f1=datetime.date(1944,1,1)','date'),
               Field('f2','date',default=datetime.date(1944,1,1)),
               Field('f3=True', 'boolean'),
               Field('f4=str(uuid4())', length=64),
               Field('f5', length=64,default=str(uuid4())),
               )

Bug??

/r 
Nik 

Reply via email to