diff --git a/src/pl/plpython/expected/plpython_test.out b/src/pl/plpython/expected/plpython_test.out
new file mode 100644
index 05caba1..bc7707d
*** a/src/pl/plpython/expected/plpython_test.out
--- b/src/pl/plpython/expected/plpython_test.out
*************** RETURNS void AS $$
*** 150,171 ****
  kwargs = { "message":_message, "detail":_detail, "hint":_hint,
  			"sqlstate":_sqlstate, "schema":_schema, "table":_table,
  			"column":_column, "datatype":_datatype, "constraint":_constraint }
! # ignore None values
! plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  $$ LANGUAGE plpythonu;
  SELECT raise_exception('hello', 'world');
  ERROR:  plpy.Error: hello
  DETAIL:  world
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 6, in <module>
!     plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  PL/Python function "raise_exception"
  SELECT raise_exception('message text', 'detail text', _sqlstate => 'YY333');
  ERROR:  plpy.Error: message text
  DETAIL:  detail text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 6, in <module>
!     plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  PL/Python function "raise_exception"
  SELECT raise_exception(_message => 'message text',
  						_detail => 'detail text',
--- 150,175 ----
  kwargs = { "message":_message, "detail":_detail, "hint":_hint,
  			"sqlstate":_sqlstate, "schema":_schema, "table":_table,
  			"column":_column, "datatype":_datatype, "constraint":_constraint }
! # ignore None values - should to work on Python2.3
! dict = {}
! for k in kwargs:
! 	if kwargs[k] is not None:
! 		dict[k] = kwargs[k]
! plpy.error(**dict)
  $$ LANGUAGE plpythonu;
  SELECT raise_exception('hello', 'world');
  ERROR:  plpy.Error: hello
  DETAIL:  world
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 10, in <module>
!     plpy.error(**dict)
  PL/Python function "raise_exception"
  SELECT raise_exception('message text', 'detail text', _sqlstate => 'YY333');
  ERROR:  plpy.Error: message text
  DETAIL:  detail text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 10, in <module>
!     plpy.error(**dict)
  PL/Python function "raise_exception"
  SELECT raise_exception(_message => 'message text',
  						_detail => 'detail text',
*************** ERROR:  plpy.Error: message text
*** 180,187 ****
  DETAIL:  detail text
  HINT:  hint text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 6, in <module>
!     plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  PL/Python function "raise_exception"
  SELECT raise_exception(_message => 'message text',
  						_hint => 'hint text',
--- 184,191 ----
  DETAIL:  detail text
  HINT:  hint text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 10, in <module>
!     plpy.error(**dict)
  PL/Python function "raise_exception"
  SELECT raise_exception(_message => 'message text',
  						_hint => 'hint text',
*************** SELECT raise_exception(_message => 'mess
*** 191,198 ****
  ERROR:  plpy.Error: message text
  HINT:  hint text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 6, in <module>
!     plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  PL/Python function "raise_exception"
  DO $$
  DECLARE
--- 195,202 ----
  ERROR:  plpy.Error: message text
  HINT:  hint text
  CONTEXT:  Traceback (most recent call last):
!   PL/Python function "raise_exception", line 10, in <module>
!     plpy.error(**dict)
  PL/Python function "raise_exception"
  DO $$
  DECLARE
diff --git a/src/pl/plpython/sql/plpython_test.sql b/src/pl/plpython/sql/plpython_test.sql
new file mode 100644
index 6e5b535..294f2dd
*** a/src/pl/plpython/sql/plpython_test.sql
--- b/src/pl/plpython/sql/plpython_test.sql
*************** RETURNS void AS $$
*** 102,109 ****
  kwargs = { "message":_message, "detail":_detail, "hint":_hint,
  			"sqlstate":_sqlstate, "schema":_schema, "table":_table,
  			"column":_column, "datatype":_datatype, "constraint":_constraint }
! # ignore None values
! plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v))
  $$ LANGUAGE plpythonu;
  
  SELECT raise_exception('hello', 'world');
--- 102,113 ----
  kwargs = { "message":_message, "detail":_detail, "hint":_hint,
  			"sqlstate":_sqlstate, "schema":_schema, "table":_table,
  			"column":_column, "datatype":_datatype, "constraint":_constraint }
! # ignore None values - should to work on Python2.3
! dict = {}
! for k in kwargs:
! 	if kwargs[k] is not None:
! 		dict[k] = kwargs[k]
! plpy.error(**dict)
  $$ LANGUAGE plpythonu;
  
  SELECT raise_exception('hello', 'world');
