1

I know the *tuple_arguments and **dict_arguments when defining a function. But it's my first time to see a single * in arguments list of a function.

xuemind
  • 405
  • 3
  • 11
  • I'm pretty sure that's a syntax error. What is the exact version of Python you are using? Does the code actually run? – gilch Dec 17 '18 at 00:39
  • The single * is allowed in a function definition, but not a function call. – gilch Dec 17 '18 at 00:40
  • the single * is frequently used in `asyncio`, standard coroutine library of Python 3.7.`def run(main, *, debug=False):`, `async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):`. – xuemind Dec 17 '18 at 00:52
  • Found the answer in [another thread](https://stackoverflow.com/a/14298976/8831771) – xuemind Dec 17 '18 at 01:41

0 Answers0