Skip to content
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

Simplify SafeRepr a bit #5603

Merged
merged 4 commits into from
Jul 16, 2019
Merged

Commits on Jul 14, 2019

  1. saferepr: Remove dead SafeRepr.repr_unicode

    This function is not called anywhere directly, and cannot be called by
    the dynamic `repr_<type>()` dispatch mechanism because unicode is no
    longer a type in Python 3.
    bluetech committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    0225be5 View commit details
    Browse the repository at this point in the history
  2. saferepr: Use an __init__ instead of setting attributes after constru…

    …ction
    
    This will be easier to type-check, and also somewhat clearer.
    bluetech committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    0394ebf View commit details
    Browse the repository at this point in the history
  3. saferepr: Remove unused setting of max_other

    max_other is used by the superclass repr_instance, but we override it
    and use maxsize instead.
    bluetech committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    c7aacc9 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2019

  1. saferepr: Avoid indirect function calls

    The DRY savings they provide are rather small, while they make it harder
    to type-check, and IMO harder to understand.
    bluetech committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    129600d View commit details
    Browse the repository at this point in the history