Varname

Latest version: v0.13.5

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

0.12.2

- Add `helpers.exec_code` function to replace `exec` so that source code is available at runtime

python
from varname import argname
from varname.helpers import exec_code


class Obj:
def __init__(self):
self.argnames = []

def receive(self, arg):
self.argnames.append(argname('arg', func=self.receive))


obj = Obj()
exec('obj.receive(1)') Error
exec_code('obj.receive(1)')
exec_code('obj.receive(2)')
print(obj.argnames) ['1', '2']


What's Changed
* 0.12.2 by pwwang in https://github.com/pwwang/python-varname/pull/103


**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.12.1...0.12.2

0.12.1

- Bump executing to 2.0.1

What's Changed
* 0.12.1 by pwwang in https://github.com/pwwang/python-varname/pull/101


**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.12.0...0.12.1

0.12.0

- Support python 3.12
- Update python3.12 to CI
- Bump `executing` to `^2.0`
- Bump up other dependencies
- Add Dockerfile for codesandbox

**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.11.2...0.12.0

0.11.2

- ✨ Add `jsobj` to create dict without explicitly specifying the key-value pairs

python
from varname.helpers import jsobj

a = 1
b = 2
before
dict(a=a, b=b, c=3) {'a': 1, 'b': 2, 'c': 3}

after
jsobj(a, b, c=3) {'a': 1, 'b': 2, 'c': 3}


**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.11.1...0.11.2

0.11.1

- ✨ Support starred variable for varname() (96)
- ✅ Fix tests
- 📝 Update docs for `varname(strict=...)`

**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.11.0...0.11.1

0.11.0

- 📝 Update README for shields badges (91)
- 🏷️ Overload types for nameof and argname (77)
- 💥 Drop python <3.8 for v0.11
If you need support for python <3.8, please use varname <0.11

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.