1# ticket: 287
2
3__doc__ = u"""
4>>> print( "%d" % Int() )
52
6>>> print( "%d" % Long() )
73
8>>> print( "%d" % IntLongA() )
92
10>>> print( "%d" % IntLongB() )
112
12
13"""
14
15
16def getint(int i):
17    """
18    >>> getint( Int() )
19    2
20    >>> getint( Long() )
21    3
22    >>> getint( IntLongA() )
23    2
24    >>> getint( IntLongB() )
25    2
26    """
27    return i
28
29def getlong(long long i):
30    """
31    >>> getlong( Int() )
32    2
33    >>> getlong( Long() )
34    3
35    >>> getlong( IntLongA() )
36    2
37    >>> getlong( IntLongB() )
38    2
39    """
40    return <int>i
41
42
43cdef class Int:
44   def __int__(self):
45       return 2
46
47cdef class Long:
48   def __long__(self):
49       return 3
50
51cdef class IntLongA:
52   def __int__(self):
53       return 2
54   def __long__(self):
55       return 3
56
57cdef class IntLongB:
58   def __int__(self):
59       return 2
60   __long__ = __int__
61