Question: I tried to install CherryPy under Ubuntu 12.04.3 server with command:

```
sudo python3.3 setup.py install

```

It seems that everything was fine. 

But when running test:

```
python3.3 -c "import cherrypy"

```

it gives an error:

```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.3/dist-packages/cherrypy/__init__.py", line 82, in <module>
from cherrypy import process
File "/usr/local/lib/python3.3/dist-packages/cherrypy/process/__init__.py", line 14, in <module>
from cherrypy.process import plugins, servers
File "/usr/local/lib/python3.3/dist-packages/cherrypy/process/plugins.py", line 424, in <module>
class PerpetualTimer(threading._Timer):
AttributeError: 'module' object has no attribute '_Timer'

```

When doing the same with 

```
python2.7 -c "import cherrypy"

```

it gives no output. 

What could it be?

Best regards,
Leonid

Answer: 
If the result of an `int` addition exceeds the range of values that can be represented in an `int` (`INT_MIN` .. `INT_MAX`), you have an *overflow*.

For signed integer types, the behavior of integer overflow is undefined.

On many implementations, you'll *usually* get a result that's consistent with ignoring all but the low-order N bits of the mathematical result (where N is the number of bits in an `int`) -- but the language does not guarantee that.

Furthermore, a compiler is permitted to *assume* that your code's behavior is defined, and to perform optimizations based on that assumption.

For example, with clang++ 3.0, this program:

```
#include <climits>
#include <iostream>

int max() { return INT_MAX; }

int main()
{
    int x = max();
    int y = x + 1;
    if (x < y) {
        std::cout << x << " < " << y << "\n";
    }
}

```

prints nothing when compiled with `-O0`, but prints

```
2147483647 < -2147483648

```

when compiled with `-O1` or higher.

Summary: Don't do that.

(Incidentally, the largest representable value of type `int` is more simply expressed as 2N-1-1, where N is the width in bits of type `int` -- or even more simply as `INT_MAX`. For a typical system with 32-bit `int`, that's 231-1, or `2147483647`. You're also assuming that `sizeof` is in units of 8 bits; in fact it's in units of `CHAR_BIT` bits, where `CHAR_BIT` is *at least* 8, but can (very rarely) be larger.)
you will have an integer overflow as the number will be too big for `int` if you want to do this you will have to declare it as a `long`

Hope this helps