You can simplify this example like this:
>>> 174 ** 165
4904852668653442061187838611454760487366325533178167907397373456352519588599065423233131397167737319275486886361329161677812258960306827407802115863260150459380820490013634069124303872650922835858611923329022540954288392236014102680789978826970589917040720077612506146107358709021927731368382330643430619926067887419695817233322447181310154127711515923344426608176922624
>>> 174 ** 165.0
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
174 ** 165.0
OverflowError: (34, 'Result too large')
As you can see, it fails when you have a float as the exponent. To understand this, a look into the manual helps:
Integers have unlimited precision. Floating point numbers are usually implemented using double
in C […] (source)
So essentially, you can do whatever you want with integers; but floats are restricted to the standard IEEE-754 limits.