<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <tuple>
          <string>Products.PythonScripts.PythonScript</string>
          <string>PythonScript</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Python_magic</string> </key>
            <value> <string encoding="base64">O/INCg==</string> </value>
        </item>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>__ac_local_roles__</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_container</string> </key>
                                <value> <string>container</string> </value>
                            </item>
                            <item>
                                <key> <string>name_context</string> </key>
                                <value> <string>context</string> </value>
                            </item>
                            <item>
                                <key> <string>name_m_self</string> </key>
                                <value> <string>script</string> </value>
                            </item>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_body</string> </key>
            <value> <string>def generic_sort(a,b):\n
  result = 0\n
  for k,v in sort_order:\n
    a_value = a.getProperty(k)\n
    b_value = b.getProperty(k)\n
    result = cmp(a_value,b_value)\n
    if result:\n
      if v in (\'DESC\', \'desc\', \'descending\', \'reverse\'):\n
        return -result\n
      else:\n
        return result\n
  return result \n
\n
unordered_list = map(lambda x: x.getObject(), unordered_list)\n
unordered_list.sort(generic_sort)\n
return unordered_list\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value> <string encoding="base64">YwAAAAAAAAAAAwAAAEAAAABzEwAAAGcAAGYAAGQBAIQCAFoAAGQAAFMoAg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hvbilzCwAAADxsYW1iZGEuNDc+DgAA
AHMAAAAAcwQAAABzb3J0KAQAAABzDAAAAGdlbmVyaWNfc29ydHMDAAAAbWFwcw4AAAB1bm9yZGVy
ZWRfbGlzdHMJAAAAX2dldGF0dHJfKAUAAABzDgAAAHVub3JkZXJlZF9saXN0cwoAAABzb3J0X29y
ZGVycwwAAABnZW5lcmljX3NvcnRzAwAAAG1hcHMJAAAAX2dldGF0dHJfKAAAAAAoAQAAAHMKAAAA
c29ydF9vcmRlcnMPAAAAU2NyaXB0IChQeXRob24pcxoAAABCYXNlX3NvcnRPYmplY3RMaXN0TGlr
ZVNRTAEAAABzBgAAAAwNFQEQASgBAAAAcxoAAABCYXNlX3NvcnRPYmplY3RMaXN0TGlrZVNRTCgB
AAAAcxoAAABCYXNlX3NvcnRPYmplY3RMaXN0TGlrZVNRTCgAAAAAKAAAAABzDwAAAFNjcmlwdCAo
UHl0aG9uKXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_skins/local_erp5/Base_sortObjectListLikeSQL</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>unordered_list=[], sort_order=()</string> </value>
        </item>
        <item>
            <key> <string>errors</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
        <item>
            <key> <string>func_code</string> </key>
            <value>
              <object>
                <klass>
                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>co_argcount</string> </key>
                        <value> <int>2</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>unordered_list</string>
                            <string>sort_order</string>
                            <string>generic_sort</string>
                            <string>map</string>
                            <string>_getattr_</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <list/>
                <tuple/>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Base_sortObjectListLikeSQL</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
