Skip to content

0.15.1

Latest

Choose a tag to compare

@pwwang pwwang released this 01 Dec 15:53
  • chore: bump executing to v2.2.1
  • feat: enhanced Subscript Support for Dynamic Indexing for varname (#119)
import varname

def func():
    print(varname.varname())

x = 0
a = [object]  * 5
# Before: ImproperUseError
# Now: prints a[x + 1]
a[x + 1] = func()  

# Supported now:
a[x + 1 + 2] = func()
a[x == 0] = func()
a[x < 1] = func()
a[0 < x < 1] = func()
a[-x] = func()

Full Changelog: 0.15.0...0.15.1