1.

Which of the following cannot be pickled?(a) Functions which are defined at the top level of a module with lambda(b) Functions which are defined at the top level of a module with def(c) Built-in functions which are defined at the top level of a module(d) Classes which are defined at the top level of a moduleThe question was asked in an online interview.I'm obligated to ask this question of Pickle Module in division Mapping Functions and Modules of Python

Answer»

The correct option is (a) Functions which are defined at the top LEVEL of a MODULE with LAMBDA

To explain: Functions which are defined at the top level of a module with lambda cannot be PICKLED.



Discussion

No Comment Found

Related InterviewSolutions