OILS
/
opy
/
gold
/ repr_method.py
View on Github
|
oilshell.org
14 lines, 8 significant
1
#!/usr/bin/env python2
2
from __future__ import print_function
3
4
5
class Foo(object):
6
def __init__(self, n):
7
self.n = n
8
9
def __repr__(self):
10
return
'<Foo %d>'
% self.n
11
12
13
f = Foo(10000)
14
print(f)