Проблема ограничения раздела заголовка Swift UITableview

Да, python может расчехлять лямбда-функции ... но только если у вас есть что-то, что использует copy_reg, чтобы зарегистрировать, как распиливать лямбда-функции - пакет dill загружает copy_reg, который вам нужен, в реестр рассола для вас, когда вы import dill.

Python 2.7.8 (default, Jul 13 2014, 02:29:54) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import dill  # the code below will fail without this line
>>> 
>>> import pickle
>>> s = pickle.dumps(lambda x, y: x+y)
>>> f = pickle.loads(s)
>>> assert f(3,4) == 7
>>> f
 at 0x10aebdaa0>

получите укроп здесь: https://github.com/uqfoundation

0
задан codeByThey 31 December 2018 в 15:18
поделиться