On 07/18/2017 01:07 AM, dieter wrote:
"Jan Gosmann" writes:
[...]
fn = load_pyfile('fn.py')['fn']
[...]
"pickle" (and "cpickle") are serializing functions as so called
"global"s, i.e. as a module reference together with a name.
This means, they cannot handle functions computed in a module
(as
"Jan Gosmann" writes:
> today I came across some weird behaviour (a bug?) in Python 2.7.13 (on
> Linux) with the cPickle module. The pickle module works and so does
> the pickle module in Python 3.
>
> I have a file fn.py with a minimal function definition:
>
> ```
> def fn():
> pass
> ```
>
Hi,
today I came across some weird behaviour (a bug?) in Python 2.7.13 (on
Linux) with the cPickle module. The pickle module works and so does the
pickle module in Python 3.
I have a file fn.py with a minimal function definition:
```
def fn():
pass
```
The actual code that I run is in a