[Tutor] Object instance package wide with Jython 2.7

2014-06-26 Thread Jorge L.
To avoid duplicated work: This a cross posting of a SE question: http://programmers.stackexchange.com/questions/246161/object-attribute-needed-at-package-level-with-python Let's consider the following scenario. We have a Python 2.7 package which serves as a library for some scripting projects. W

[Tutor] OverflowError: cannot fit 'long' into an index-sized integer

2014-01-07 Thread Jorge L.
I'm working through Project Euler problems, now I'm at problem 3. I did an implementation of the shieve of Erastothenes to find the prime numbers less than a given number. Then I run a divisibility test over those prime numbers to find the largest prime factor of that given number. Here's the code: