Skip to content
Snippets Groups Projects
Select Git revision
  • 000730ecaa24f39ff0459573a293e62d6928d3de
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

objstr.c

Blame
  • class_store.py 182 B
    # store to class vs instance
    
    class C:
        pass
    
    c = C()
    c.x = 1
    print(c.x)
    C.x = 2
    C.y = 3
    print(c.x, c.y)
    print(C.x, C.y)
    print(C().x, C().y)
    c = C()
    print(c.x)
    c.x = 4
    print(c.x)