15.06.20 04:06, Greg Ewing пише:
Instead of a bunch of ad-hoc mechanisms for finding out about
platform-dependent arguments, maybe there should be a function
in the inspect module for testing whether a function has a given
argument. Then you could say something like

    if inspect.hasargument(glob.glob, 'dir_fd'):
       ...


How can the inspect module know? The function's signature is the same. Just not all values or types are accepted on all platforms.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/HKQ6J7E7QQJHS5YWP4KDPLJLQFUBPPZ4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to