Skip to content

davisyoshida/360blockscope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

Block scoping in python (ironically)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages