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
  • 115,751
  • 26
  • 228
  • 437
Mark Estrada
  • 9,013
  • 37
  • 119
  • 186
  • 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