Commit dbcddc0a authored by Yoshinori Okuji's avatar Yoshinori Okuji

2007-11-02 yo

* A minor optimization.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17380 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44c7b027
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
return make_query(dict([(k, v) for k, v in http_parameter_list.items() if v is not None]))\n return make_query((item for item in http_parameter_list.iteritems() if item[1] is not None))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -121,14 +121,7 @@ return make_query(dict([(k, v) for k, v in http_parameter_list.items() if v is n ...@@ -121,14 +121,7 @@ return make_query(dict([(k, v) for k, v in http_parameter_list.items() if v is n
<string>http_parameter_list</string> <string>http_parameter_list</string>
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>dict</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>k</string>
<string>v</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
553 556
\ No newline at end of file \ No newline at end of file
...@@ -78,9 +78,7 @@ ...@@ -78,9 +78,7 @@
# Cancel url is always overwritten, except when rendering\n # Cancel url is always overwritten, except when rendering\n
# a dialog. So this is safe to propagate it.\n # a dialog. So this is safe to propagate it.\n
\n \n
kept_names = dict([(key, None) for key in kept_names])\n return dict((item for item in parameter_list.iteritems() if item[0] in kept_names))\n
to_keep = kept_names.has_key\n
return dict([(k, v) for k, v in parameter_list.items() if to_keep(k)])\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -132,15 +130,7 @@ return dict([(k, v) for k, v in parameter_list.items() if to_keep(k)])\n ...@@ -132,15 +130,7 @@ return dict([(k, v) for k, v in parameter_list.items() if to_keep(k)])\n
<string>parameter_list</string> <string>parameter_list</string>
<string>kept_names</string> <string>kept_names</string>
<string>dict</string> <string>dict</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>key</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>to_keep</string>
<string>k</string>
<string>v</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
424 425
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment