Other alternatives might be: Field('name', **Field.readonly)? Field('name').readonly()?
though I appreciate explicit is better than implicit. On 3月6日, 午前9:49, Michele Comitini <michele.comit...@gmail.com> wrote: > +1 > > 2011/3/6 Thadeus Burgess <thade...@thadeusb.com>: > > > > > > > > > Explicit is better than implicit. Typing is cheap. Design is the hardest > > part of development. > > > -- > > Thadeus > > > On Sat, Mar 5, 2011 at 2:52 PM, Vidul Petrov <vidul.r...@gmail.com> wrote: > > >> I agree with Stefaan. > > >> However the ':' before a variable name notation looks like the Ruby > >> symbols whose only purpose was improved performance (lightweight > >> strings) but lead inevitably to confusion (IMHO). > > >> On Mar 4, 5:55 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> > >> wrote: > >> > There are some new features in trunk: > > >> > 1) > > >> > I got tired of writing default='value',readable=False,writable=False > >> > etc. > > >> > So: > > >> > Field(':name') is the same as > >> > Field('name',readable=False,writable=False) > >> > Field('.name') is the same as > >> > Field('name',readable=True,writable=False) > >> > Field('name=value') is the same as Field('name',default='value') > > >> > and combinations: > > >> > Field(':name=value') is the same as > >> > Field('name',default='value',readable=True,writable=False) > > >> > notice > > >> > Field('name=') is the same as Field('name',default='') > > >> > 2) > > >> > db(db.table).select((db.table.field.length()+5).sum()) > > >> > note operators length(), +5, sum() can be combined in more ways than > >> > before.