Python type hinting without cyclic imports

I’m trying to split my huge class into two; well, basically into the “main” class and a mixin with additional functions, like so: main.py file: import mymixin.py class Main(object, MyMixin): def func1(self, xxx): … mymixin.py file: class MyMixin(object): def func2(self: Main, xxx): # <— note the type hint … Now, while this works just fine, … Read more

Python3: ImportError: No module named ‘_ctypes’ when using Value from module multiprocessing

I am using Ubuntu and have installed Python 2.7.5 and 3.4.0. In Python 2.7.5 I am able to successfully assign a variable x = Value(‘i’, 2), but not in 3.4.0. I am getting: Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/usr/local/lib/python3.4/multiprocessing/context.py”, line 132, in Value from .sharedctypes import Value File … Read more