New submission from Bharat Solanki <bharatsln...@gmail.com>:
Hi Team, Below code is giving different result in python 2.7 and 3.7 version. Code is running fine when i am using 2.7 but in 3.7, it is showing error. from multiprocessing import Pool import traceback class Utils: def __init__(self): self.count = 10 def function(): global u1 u1 = Utils() l1 = range(3) process_pool = Pool(1) try: process_pool.map(add, l1, 1) process_pool.close() process_pool.join() except Exception as e: process_pool.terminate() process_pool.join() print(traceback.format_exc()) print(e) def add(num): total = num + u1.count print(total) if __name__ == "__main__": function() Could you please help me on this how can it run in 3.7 version. Thanks, Bharat ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 364559 nosy: Bharatsolanki priority: normal severity: normal status: open title: Getting different result in python 2.7 and 3.7. type: compile error versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40005> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com