Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #-*- coding: utf-8 -*-
- # My implementation of
- #
- # int i = 5;
- # i = ++i + ++i;
- # printf('i=%d',i);
- #
- # mindfack....
- # set and increment
- class I:
- def __init__(self,x):
- self.x = x
- def incr(self):
- self.x += 1
- return self.x
- # int i = 5;
- i = I(5)
- # i = ++i + ++i;
- i = i.incr() + i.incr()
- # printf('i=%d',i);
- # // i = 13 //
- print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement