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

Naming Convention Violations in OpenCV Python Bindings #1079

Open
gabemorris12 opened this issue Jan 23, 2025 · 0 comments
Open

Naming Convention Violations in OpenCV Python Bindings #1079

gabemorris12 opened this issue Jan 23, 2025 · 0 comments

Comments

@gabemorris12
Copy link

Naming conventions are important for readability, and as the title implies, this package does not comply with the PEP 8 naming conventions. As a result, the code can be harder to read, maintain, and integrate with other Python projects that follow standard conventions, leading to inconsistencies, increased learning curves for new developers, and potential for misinterpretation or errors.

A practical solution would be to introduce name aliases to allow backwards compatibility, but also give the choice to pursue the style of modern projects. Another option would be to do something like the threading module does:

def current_thread():
    """Return the current Thread object, corresponding to the caller's thread of control.

    If the caller's thread of control was not created through the threading
    module, a dummy thread object with limited functionality is returned.

    """
    try:
        return _active[get_ident()]
    except KeyError:
        return _DummyThread()

def currentThread():
    """Return the current Thread object, corresponding to the caller's thread of control.

    This function is deprecated, use current_thread() instead.

    """
    import warnings
    warnings.warn('currentThread() is deprecated, use current_thread() instead',
                  DeprecationWarning, stacklevel=2)
    return current_thread()

Are there any thoughts on addressing this issue?

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

No branches or pull requests

1 participant