Browse Source

[python] do not generate "if arg is None: arg = None" for function arguments

Dan Korostelev 11 years ago
parent
commit
17ad10d5a9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genpy.ml

+ 1 - 1
genpy.ml

@@ -249,7 +249,7 @@ module Transformer = struct
 	let rec transform_function tf ae is_value =
 		let p = tf.tf_expr.epos in
 		let assigns = List.fold_left (fun acc (v,value) -> match value with
-			| None ->
+			| None | Some TNull ->
 				acc
 			| Some ct ->
 				let a_local = mk (TLocal v) v.v_type p in