2

Python newbie here. The docs have an example for OrderedDict usage:

class LRU(OrderedDict):
    'Limit size, evicting the least recently looked-up key when full'

    def __init__(self, maxsize=128, /, *args, **kwds):
        self.maxsize = maxsize
        super().__init__(*args, **kwds)

What is the / in the __init__ method signature?

Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219

0 Answers0