File: testPickleSegFault.py

package info (click to toggle)
egenix-mx-base 3.2.8-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,420 kB
  • ctags: 6,208
  • sloc: ansic: 22,304; python: 18,124; sh: 137; makefile: 121
file content (25 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from mx.TextTools import *
import pickle

# This works fine:

tags = (
    (None, Is, 'a'),
)
        
t = TagTable(tags)
print type(t)
s = pickle.dumps(t)
print pickle.loads(s)
        
# But this crashes ...
        
tags = (
    (None, Is, u'\u03a3'),
)
                
t = UnicodeTagTable(tags)
print type(t)
s = pickle.dumps(t)
print pickle.loads(s)