2017-08-05 09:49:02 +00:00
|
|
|
# Copyright 2017 The go-python Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
import arrays
|
|
|
|
|
|
|
|
a = [1,2,3,4]
|
|
|
|
b = arrays.CreateArray()
|
|
|
|
print ("Python list:", a)
|
|
|
|
print ("Go array: ", b)
|
2019-03-06 10:41:03 +00:00
|
|
|
# note: only support slices as converted from python -- arrays don't make sense
|
|
|
|
#print ("arrays.IntSum from Python list:", arrays.IntSum(a))
|
2017-08-05 09:49:02 +00:00
|
|
|
print ("arrays.IntSum from Go array:", arrays.IntSum(b))
|
2019-01-16 13:47:57 +00:00
|
|
|
|
|
|
|
print("OK")
|