lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Remove intent Out

Open certik opened this issue 7 months ago • 0 comments

Due to https://github.com/lfortran/lfortran/pull/7842#issuecomment-2993661103, the intent Out doesn't have an equivalent behavior in Python, since for structs with default values we would need to initialize them on function enter, which Python doesn't do. So the subset of Python can only do intent In (read only --- enforced by LPython) and intent InOut (the default in Python for non-primitive types). Primitive types must be intent In (effectively read only), we already do that.

certik avatar Jun 21 '25 16:06 certik