Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.7.3 (default, Aug 1 2012, 05:16:07)
- [GCC 4.6.3] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from Engine import Engine, User
- >>> e = Engine("glocke", 12)
- >>> e.run()
- New value is of 'glocke' is 1
- New value is of 'glocke' is 2
- New value is of 'glocke' is 3
- New value is of 'glocke' is 4
- New value is of 'glocke' is 5
- New value is of 'glocke' is 6
- New value is of 'glocke' is 7
- New value is of 'glocke' is 8
- New value is of 'glocke' is 9
- New value is of 'glocke' is 10
- New value is of 'glocke' is 11
- New value is of 'glocke' is 12
- >>> u = User("foobar")
- >>> print u.foo
- <Swig Object of type 'std::map< int,std::string,std::less< int >,std::allocator< std::pair< int const,std::string > > > *' at 0xb7209908>
- >>> u.foo[2] = "Zwei"
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: 'SwigPyObject' object does not support item assignment
- >>> u.foo.append(2, "Zwei")
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: append() takes exactly one argument (2 given)
- >>> u.foo.append((2, "Zwei"))
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- SystemError: error return without exception set
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement