FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. by serhiy-storchaka · Pull Request #8414 · python/cpython · GitHub

Repository navigation

bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. - #8414

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:tests-ndarray-readonly-bool
Jul 26, 2018
Merged

serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:tests-ndarray-readonly-bool

Conversation

serhiy-storchaka commented Jul 23, 2018 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

serhiy-storchaka merged commit e0d67f1 into python:master Jul 26, 2018
serhiy-storchaka deleted the tests-ndarray-readonly-bool branch July 26, 2018 10:23
Comment thread Lib/test/test_buffer.py
itemsize, fmt, readonly,
ndim, shape, strides,
lst, sliced=False, cast=False):
# Verify buffer contents against expected values. Default values

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The comment that gives the rationale for the curious initialization no longer applies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done in #8481.

Comment thread Lib/test/test_buffer.py

# The consumer may have requested default values or a NULL format.
ro = 0 if match(req, PyBUF_WRITABLE) else ex.readonly
ro = not match(req, PyBUF_WRITABLE) and ex.readonly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you please use the previous version, just replacing 0 with False?

I can accept not p or q for implication, but this goes too far IMHO.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL