[issue32291] Value error for string shared memory in multiprocessing

2017-12-12 Thread Marc Guetg
New submission from Marc Guetg <guetg.m...@gmail.com>: It seems like sharing a string over processes is not possible. #!/usr/bin/env python3 import multiprocessing import threading import ctypes def fun(share_c, share_s,

[issue29594] implementation of __or__ in enum.auto

2017-03-01 Thread Marc Guetg
Marc Guetg added the comment: @ethan, didn't know about aenum, thanks for showing it to me. However it doesn't seem to support the behavior I'm after (or I'm doing something wrong) import aenum try: class Foo(aenum.Flag): a = aenum.auto() b

[issue29594] implementation of __or__ in enum.auto

2017-02-19 Thread Marc Guetg
Marc Guetg added the comment: One made-up use-case would be: class LogLevel(Flags): start = auto() log1 = start | auto() log2 = start | auto() def fun(flags, *args): if start in flags: # open log file if log1 in flags: # Log important thing 1 if log2

[issue29594] implementation of __or__ in enum.auto

2017-02-17 Thread Marc Guetg
Changes by Marc Guetg <guetg.m...@gmail.com>: -- title: implement __or__ in enum.auto -> implementation of __or__ in enum.auto ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29594] implement __or__ in enum.auto

2017-02-17 Thread Marc Guetg
New submission from Marc Guetg: At the moment it is only possible to combine flags that already exist: from enum import * class Foo(Flag): A = auto() # 1 B = auto() # 2 AB = A | B # 3 (1 | 2) AC = auto() | A # Fails, but should be 5 (1 | 4) ABD = auto

[issue26514] Object defines '__ne__' as 'not __eq__' if '__ne__' is not implemented

2016-03-08 Thread Marc Guetg
New submission from Marc Guetg: I propose to change __ne__ of `object` in the following form: class NewObject(object): def __ne__(self, other): return not self.__eq__(other) Currently overwriting the `__eq__` method requires also overwriting