Author pitrou
Recipients Nathan.Goldbaum, pitrou
Date 2020-02-21.10:04:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582279456.26.0.555819543891.issue39681@roundup.psfhosted.org>
In-reply-to
Content
Well, in the mmap case, this is trivially fixed by writing:
```
with open("my_data.pkl", "r+b") as f_in:
    mm = mmap.mmap(f_in.fileno(), 0)

print(pickle.loads(memoryview(mm)))
```

It will also be faster this way, since the pickle will be read directly from memory instead of going through read() calls.

This makes me think that perhaps this issue isn't as bad: it forces people to abandon bad idioms :-)
History
Date User Action Args
2020-02-21 10:04:16pitrousetrecipients: + pitrou, Nathan.Goldbaum
2020-02-21 10:04:16pitrousetmessageid: <1582279456.26.0.555819543891.issue39681@roundup.psfhosted.org>
2020-02-21 10:04:16pitroulinkissue39681 messages
2020-02-21 10:04:16pitroucreate