missing-features

Rounding a math calculation up, without math.ceil()?

Rounding a math calculation up, without math.ceil()? Question: I’m working on a system which doesn’t have the math module available. All “Math” functions installed (math.ceil(), math.round(), etc all produce errors). I have even tried using import math which yields: <type ‘ImportError’> __import__ not found Current issue that is stumping me: How can I make a …

Total answers: 7

Threading pool similar to the multiprocessing Pool?

Threading pool similar to the multiprocessing Pool? Question: Is there a Pool class for worker threads, similar to the multiprocessing module’s Pool class? I like for example the easy way to parallelize a map function def long_running_func(p): c_func_no_gil(p) p = multiprocessing.Pool(4) xs = p.map(long_running_func, range(100)) however I would like to do it without the overhead …

Total answers: 11

Function overloading in Python: Missing

Function overloading in Python: Missing Question: As function overloading says: Function overloading is absent in Python. As far as I feel this a big handicap since its also an object-oriented (OO) language. Initially I found that unable to differentiate between the argument types was difficult, but the dynamic nature of Python made it easy (e.g. …

Total answers: 5