saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
163 stars 74 forks source link

Missing user data in callbacks #137

Closed sergico closed 3 years ago

sergico commented 3 years ago

More than an issue this is a question.

As an exemple:

void ares_gethostbyname(ares_channel channel, const char *name,
int family, ares_host_callback callback, void *arg)
saghul commented 3 years ago

You can use a partial function for that: https://docs.python.org/3.8/library/functools.html#functools.partial