/testing/test_resources/test_inherit_str.py

http://github.com/jdf/processing.py · Python · 12 lines · 10 code · 2 blank · 0 comment · 0 complexity · 04d284d387d6e9f74d4674124fae1399 MD5 · raw file

  1. class Foo(str):
  2. def __init__(self, arg):
  3. self.arg = arg
  4. def __repr__(self):
  5. return self.arg
  6. foo = Foo('cosmic')
  7. print foo
  8. print str(12)
  9. print str([12,13])
  10. exit()