Changes between Version 49 and Version 50 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
06/18/10 09:29:21 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v49 v50  
    178178{{{
    179179for x in y:
    180     if x.a == some_value or other_variable == other_value:
     180    if x.a == some_value:
    181181        record = db(db.mytable.id == x.key).select()
    182182        ...<branch 1>
     
    189189
    190190{{{
    191 if other_variable == other_value:
    192     ids1 = [x.key for x in y]
    193     ids2 = []
    194 else:
    195     ids1 = filter(lambda x: (x.a == some_value) and x.key or None, y)
    196     ids2 = filter(lambda x: (x.a != some_value) and x.other_key or None, y)
     191ids1 = filter(lambda x: (x.a == some_value) and x.key or None, y)
     192ids2 = filter(lambda x: (x.a != some_value) and x.other_key or None, y)
    197193if ids1:
    198194    records = db(db.mytable.id.belongs(ids1)).select()
     
    208204DeveloperGuidelines
    209205DeveloperGuidelines
     206DeveloperGuidelines