We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would the following be a useful addition to funcy?
def plain(x): """Creates a function accepting any args, but always returning x().""" return lambda *a, **kw: x()
Or can this be emulated using existing funcy functionality?
A use case for this is to connect a function to to a Qt (PySide) Signal that passes parameters that we do not need.
So instead of doing
QLineEdit().textChanged.connect( lambda _unused_event_value_str: callback() )
one could do
signal.connect(plain(callback))
ignore_args might be another fitting name.
ignore_args
The text was updated successfully, but these errors were encountered:
Maybe not sure this is of very general use though.
Sorry, something went wrong.
No branches or pull requests
Would the following be a useful addition to funcy?
Or can this be emulated using existing funcy functionality?
A use case for this is to connect a function to to a Qt (PySide) Signal that passes parameters that we do not need.
So instead of doing
one could do
ignore_args
might be another fitting name.The text was updated successfully, but these errors were encountered: