On Sep 18, 2:35 am, gert wrote:
> On Sep 18, 2:11 am, Chris Rebert wrote:
>
>
>
> > On Thu, Sep 17, 2009 at 5:03 PM, gert wrote:
>
> >
>
> > > So far i have this
> > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointme...
>
> > > I have 3 problems left Any_GID, Everybody_no_GI
On Sep 18, 2:11 am, Chris Rebert wrote:
> On Thu, Sep 17, 2009 at 5:03 PM, gert wrote:
>
>
>
> > So far i have this
> >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointme...
>
> > I have 3 problems left Any_GID, Everybody_no_GID,
>
> Just add entries to the dictionary with the
On Thu, Sep 17, 2009 at 5:03 PM, gert wrote:
> So far i have this
> http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointment.wsgi
>
> I have 3 problems left Any_GID, Everybody_no_GID,
Just add entries to the dictionary with the same function as value but
all permutations of GID as
On Sep 18, 12:18 am, gert wrote:
> On Sep 18, 12:12 am, gert wrote:
>
>
>
> > On Sep 18, 12:09 am, gert wrote:
>
> > > On Sep 17, 9:48 pm, Chris Rebert wrote:
>
> > > > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> > > > > Can anybody show me a better looking alternative for this elif
> > >
On Sep 18, 12:12 am, gert wrote:
> On Sep 18, 12:09 am, gert wrote:
>
>
>
> > On Sep 17, 9:48 pm, Chris Rebert wrote:
>
> > > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> > > > Can anybody show me a better looking alternative for this elif
> > > > structure ?
>
> > > Use a dictionary with fu
On Thu, Sep 17, 2009 at 3:09 PM, gert wrote:
> On Sep 17, 9:48 pm, Chris Rebert wrote:
>> On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
>> > Can anybody show me a better looking alternative for this elif
>> > structure ?
>>
>> Use a dictionary with functions as values. For example:
>>
>> #untest
On Sep 18, 12:09 am, gert wrote:
> On Sep 17, 9:48 pm, Chris Rebert wrote:
>
>
>
> > On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> > > Can anybody show me a better looking alternative for this elif
> > > structure ?
>
> > Use a dictionary with functions as values. For example:
>
> > #untested
On Sep 17, 9:48 pm, Chris Rebert wrote:
> On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> > Can anybody show me a better looking alternative for this elif
> > structure ?
>
> Use a dictionary with functions as values. For example:
>
> #untested obviously
> def admin_remove(db, v, gid):
> db.e
On Sep 17, 2:38 pm, gert wrote:
> Can anybody show me a better looking alternative for this elif
> structure ?
>
> http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointme...
For starters assign v['cmd'] to a variable instead of looking it up
every time!
cmd = v['cmd']
if cmd == ..
On Sep 17, 9:48 pm, Chris Rebert wrote:
> On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> > Can anybody show me a better looking alternative for this elif
> > structure ?
>
> Use a dictionary with functions as values. For example:
>
> #untested obviously
> def admin_remove(db, v, gid):
> db.e
gert wrote:
Can anybody show me a better looking alternative for this elif
structure ?
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointment.wsgi
Where you have cascaded ifs based on a single value, one alternative is
to use a dict where the test value is the key and function
On Thu, Sep 17, 2009 at 12:38 PM, gert wrote:
> Can anybody show me a better looking alternative for this elif
> structure ?
Use a dictionary with functions as values. For example:
#untested obviously
def admin_remove(db, v, gid):
db.execute("DELETE FROM appointments WHERE aid=?",(v['aid'],)
Can anybody show me a better looking alternative for this elif
structure ?
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointment.wsgi
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo