0

I was looking through the urllib.urlopen method and I saw this in its definition. What is meant by this?

def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
            *, cafile=None, capath=None, cadefault=False, context=None):

What does it mean?

jonrsharpe
  • 107,083
  • 22
  • 201
  • 376
Mark Estrada
  • 8,685
  • 36
  • 113
  • 178
  • It makes the arguments after the `*` only able to be used as keyword arguments, this is because the * will absorb excess positional arguments. Google search for keyword only arguments – Keatinge May 23 '19 at 08:04
  • Ok got it. Its a duplicate question. Closing this now. Thanks – Mark Estrada May 23 '19 at 08:06

0 Answers0