@@ -108,10 +108,6 @@ def _convert(obj: Any, converters: typing.List[Converter]) -> Any:
108108 return prioritized .converter (obj )
109109
110110
111- def _add_converter (converter : Converter , converters : typing .List [Converter ]):
112- converters .append (converter )
113-
114-
115111# -- Python to Java --
116112
117113# Adapted from code posted by vslotman on GitHub:
@@ -155,7 +151,7 @@ def add_java_converter(converter: Converter):
155151 Adds a converter to the list used by to_java
156152 :param converter: A Converter going from python to java
157153 """
158- _add_converter (converter , java_converters )
154+ java_converters . append (converter )
159155
160156
161157def to_java (obj : Any ) -> Any :
@@ -453,7 +449,7 @@ def add_py_converter(converter: Converter):
453449 Adds a converter to the list used by to_python
454450 :param converter: A Converter from java to python
455451 """
456- _add_converter (converter , py_converters )
452+ py_converters . append (converter )
457453
458454
459455def to_python (data : Any , gentle : bool = False ) -> Any :
@@ -774,9 +770,9 @@ def _pandas_to_table(df):
774770
775771def _initialize_converters ():
776772 for converter in _stock_java_converters ():
777- _add_converter (converter , java_converters )
773+ add_java_converter (converter )
778774 for converter in _stock_py_converters ():
779- _add_converter (converter , py_converters )
775+ add_py_converter (converter )
780776
781777
782778when_jvm_starts (_initialize_converters )
0 commit comments