Popular recipes by Andrew Konstantaras http://code.activestate.com/recipes/users/4141807/2008-07-23T23:55:00-07:00ActiveState Code RecipesConvenient Utility for Making Dictionaries (Python)
2008-07-23T23:55:00-07:00Andrew Konstantarashttp://code.activestate.com/recipes/users/4141807/http://code.activestate.com/recipes/576373-convenient-utility-for-making-dictionaries/
<p style="color: grey">
Python
recipe 576373
by <a href="/recipes/users/4141807/">Andrew Konstantaras</a>
(<a href="/recipes/tags/shortcuts/">shortcuts</a>).
</p>
<p>This function creates a dictionary containing all of the variables passed as parameters with the variable name being the key and the value of the variable as the value. I use it frequently when passing parameters to another function.</p>
Auto Generation of SQL Insert Statement Columns and Values from Object (Python)
2008-05-12T21:29:06-07:00Andrew Konstantarashttp://code.activestate.com/recipes/users/4141807/http://code.activestate.com/recipes/572197-auto-generation-of-sql-insert-statement-columns-an/
<p style="color: grey">
Python
recipe 572197
by <a href="/recipes/users/4141807/">Andrew Konstantaras</a>
(<a href="/recipes/tags/database/">database</a>).
Revision 2.
</p>
<p>Automates the creation of SQL INSERT statements for the "simple" attributes in a python object by creating a string of an object's attribute names and a corresponding string of that object's attribute values. Simple attributes are those that are one of the following types: string, int, long, float, boolean, None.</p>