Stuff

Weekend Project IV Part 2

In continuation of Weekend Project IV, i have updated the code to work with the a graphics LCD, i am using JHD 12864e it works on Ks0108 driver, earlier i was writing my own driver for this graphic LCD but i found that Arduino already has support for the LCD using the GLCD library and its pretty awesome.

here is the working

strange thing in python

i recently noticed this anyone has a proper explanation for this

for literals i get this

>>> def a():
...     b = []
...     c = {}
...
>>> import dis
>>> dis.dis(a)
2 0 BUILD_LIST               0
3 STORE_FAST               0 (b)


3 6 BUILD_MAP                0
9 STORE_FAST               1 (c)
12 LOAD_CONST               0 (None)
15 RETURN_VALUE

but for constructors i get this

>>> def a():
... b = list()
... c = dict()
...
>>> dis.dis(a)
2 0 LOAD_GLOBAL 0 (list)
3 CALL_FUNCTION 0
6 STORE_FAST 0 (b)


3  9 LOAD_GLOBAL 1 (dict)
12 CALL_FUNCTION 0
15 STORE_FAST 1 (c)
18 LOAD_CONST 0 (None)
21 RETURN_VALUE

i mean why the difference, i was thinking {} and dict() do the same thing, shouldn’t they?

  • My latest tweets

    Follow me on Twitter!
  • Calendar

    May 2012
    M T W T F S S
    « Jan    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Flickr Photos

    IMAG0560

    IMAG0561

    IMAG0562

    IMAG0587

    More Photos