Skip to main content

Block scoping for python

Project description

Block scoping in python

Just to be clear, I made this as a joke.

import block_scoping as bs

def main():
    x = 7
    with bs():
        y = x + 4
        print(f'y: {y}') # y: 11
        x -= 3

    print('x: {x}') # x: 4
    print('y: {y}') # UnboundLocalError

main()

Project details


Download files

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

Source Distribution

360blockscope-0.1.0.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

360blockscope-0.1.0-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page