- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | skrah |
|---|---|
| Recipients | Kentzo, skrah |
| Date | 2018-12-21.22:40:41 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1545432041.85.0.377332604947.issue35548@roundup.psfhosted.org> |
| In-reply-to |
| Content |
|---|
The reason is that unfortunately readonly != immutable, as the following example shows: >>> import numpy as np >>> x = np.array([1,2,3], dtype='B') >>> y = x[:] >>> y.flags['WRITEABLE'] = False >>> m = memoryview(y) >>> m.readonly True >>> m.tolist() [1, 2, 3] >>> x[0] = 100 >>> m.tolist() [100, 2, 3] An object like 'y' is allowed to re-export memory, using its own flags. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-12-21 22:40:42 | skrah | set | recipients: + skrah, Kentzo |
| 2018-12-21 22:40:41 | skrah | set | messageid: <1545432041.85.0.377332604947.issue35548@roundup.psfhosted.org> |
| 2018-12-21 22:40:41 | skrah | link | issue35548 messages |
| 2018-12-21 22:40:41 | skrah | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
