PyneComp v6.0.64 — seven fixes for scripts that used to convert or compile into Python…
Fixes
- A Pine v5 script dividing two integer constants (
10 / 3) kept Pine 5’s truncating integer result instead of silently turning into a decimal one after conversion — this changed values wherever a script compared against such a division - A
forloop whosetobound can move while the body runs (for i = 0 to array.size(a) - 1with the body removing elements) now re-reads that bound before every iteration, as TradingView does, instead of running off the end with an index error - A script where a variable takes the same name as one of your own types no longer fails on the type’s constructor (
lab.new(...)used to raise'list' object is not callable) - A user type named after a builtin namespace (
type sessionnext to asession.*read) no longer fails onsession.new(...) - The namespace form of a UDT copy,
T.copy(obj), copied the type instead of the object and crashed; it now copies the object you passed - Importing a library under an alias that spells a builtin namespace (
ta, for example) no longer hides the builtin: the library’s own exports win and everything else still reachesta.atrand friends - A v4/v5 call that passes the same argument both positionally and by name — which TradingView accepts — no longer produces a script that fails with “got multiple values for argument”
- A declaration whose initializer reads the variable it declares (
x = switch x,x = if ... x ...) no longer produces a script that fails on the outer read