Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Returns variable name as a string

Project description

# GET VARIABLE NAME Returns the variable name of an object in current program/script as a string. Usage: get_variable_name(var)


EXAMPLE ` >>> import get_variable_name >>> >>> foo = [‘bar’, True, ‘buzz’] >>> cat = get_variable_name(foo) >>> print(foo) [‘bar’, True, ‘buzz’] >>> print(cat) foo >>> print(type(foo)) list >>> print(type(cat)) str `

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for get-variable-name, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size get_variable_name-0.0.2-py2-none-any.whl (3.1 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size get_variable_name-0.0.2.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page