This CL makes sure we are more or less ready for python3.
- import __future__.print_function so python2 can use the same
print(foo, bar) syntax than python3
- use the python3 syntax for catching exceptions
This is a first attempt to properly cast struct arguments to method calls.
The test example would be:
func (S) MethodTest(S) {}
func FuncTest(S) {}
from the structs.go example.
Change-Id: I568299508c6f62975792acf9de2d6d2f7cc4271d
Previously, the tp_init function being generated for a struct would try to fill
private fields from the args passed to __init__.
This obviously breaks Go's encapsulation mechanism.
Only allow public fields to be initialized from __init__.
Add a test.
Fixes#52.