Guest User

Python dictionary allocation weirdness

a guest
Jul 13th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. Python 2.7.3 (default, Mar 13 2014, 11:03:55)
  2. [GCC 4.7.2] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> st = set(['apple', 'orange', 'apple', 'pear', 'orange', 'banana'])
  5. >>> lst = [1, 2, 3, "4"]
  6. >>> tpl = (1, 2, 3, '4')
  7. >>> dct = {'one': 1, 'two': 2, 'three': 3};
  8. >>> st.__repr__
  9. <method-wrapper '__repr__' of set object at 0x7f6b38e2dd00>
  10. >>> tpl.__repr__
  11. <method-wrapper '__repr__' of tuple object at 0x7f6b38e387e0>
  12. >>> lst.__repr__
  13. <method-wrapper '__repr__' of list object at 0x7f6b38de2b48>
  14. >>> dct.__repr__
  15. <method-wrapper '__repr__' of dict object at 0x1c36400>
  16. >>>
Advertisement
Add Comment
Please, Sign In to add comment