Skip to content

Simplify argument checking in Table.__getitem__. #12932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 5, 2018

This just lets the exception, if any, propagate out of
dict.__getitem__; this avoids e.g. Table[a, b, c] silently "working"
by silently dropping the third argument.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This just lets the exception, if any, propagate out of
`dict.__getitem__`; this avoids e.g. `Table[a, b, c]` silently "working"
by silently dropping the third argument.
@anntzer anntzer added this to the v3.1 milestone Dec 5, 2018
@timhoffm timhoffm merged commit a6d689c into matplotlib:master Dec 5, 2018
raamana added a commit to raamana/matplotlib that referenced this pull request Dec 13, 2018
* upstream/master: (1723 commits)
  Correctly get weight & style hints from certain newer Microsoft fonts (matplotlib#12945)
  Remove some checks for Py<3.6 in the test suite. (matplotlib#12974)
  Fail-fast when trying to run tests with too-old pytest.
  Include scatter plots in Qt figure options editor. (matplotlib#12779)
  ENH: replace deprecated numpy header
  Minor simplifications.
  tickminorvisible-fix (matplotlib#12938)
  Remove animated=True from animation docs
  Update the documentation of Cursor
  Misc. cleanups.
  Add test for 3d conversion of empty PolyCollection
  Support ~ as nonbreaking space in mathtext.
  Deprecate public use of Formatter.pprint_val.
  MAINT: Unify calculation of normal vectors from polygons (matplotlib#12136)
  Fix the title of testing_api
  More table documentation
  Simplify bachelors degree example using new features.
  Avoid pyplot in showcase examples.
  Simplify argument checking in Table.__getitem__. (matplotlib#12932)
  Minor updates following bump to Py3.6+.
  ...

# Conflicts:
#	lib/matplotlib/widgets.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants