|
|
|
|
|
by Sharlin
3809 days ago
|
|
Should be noted that this only works on a "statically typeable" subset of Python where every variable has a de facto static type inferred at the first assignment. For instance, the following valid Python code would output invalid C++: var = []
var = 2
|
|
For the array I do a little hackery. You can define the array without an initial value in the container and I can guess the value type.
it will spit out