umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

cPickle doesn't work #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is caused by function referencing in classes.

For example:

# used in OP2 objects
class A:
    def __init__(self):
       self.value = 1
       self.func = self.f

    def f(self):
       return 10

and:

# used in OP2 table mapper
def func2():
    return 5

dictA = {
   'key' : func2
}

Original issue reported on code.google.com by mesheb82 on 28 Feb 2014 at 1:19

GoogleCodeExporter commented 9 years ago
Removed internally referenced functions and deleted file object upon finishing 
OP2 read to fix this

Original comment by mesheb82 on 23 Sep 2014 at 6:46