0

When I use >>> help(list) I get a list of method descriptions, see below. But I'm struggling with a small bit of confusion. In the examples below what does the '/' inside the parentheses represent at the end of the methods? It seems to be present in all of them and I'm at a loss as to what it represents or where to find that specific answer.

 | append(self, object, /)
 |      Append object to the end of the list.
 |  
 |  clear(self, /)
 |      Remove all items from list.
 |  
 |  copy(self, /)
 |      Return a shallow copy of the list.
 |  
 |  count(self, value, /)
 |      Return number of occurrences of value..... 
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
RobC
  • 13
  • 3
  • I guess "no more parameters" – EvgenyKolyakov Jun 27 '22 at 10:50
  • @EvgenyKolyakov - Please review the linked answer for the explanation. (Aside, please don't post 'guesses' as they can be misleading.) – S3DEV Jun 27 '22 at 11:17
  • @S3DEV but apparently I was right. – EvgenyKolyakov Jun 27 '22 at 12:50
  • @EvgenyKolyakov - According to [Python documentation](https://docs.python.org/3/faq/programming.html#what-does-the-slash-in-the-parameter-list-of-a-function-mean): "A slash in the argument list of a function denotes that the parameters prior to it are positional-only." This *can* mean end of parameters, *if* no named arguments are accepted. However, this is not always the case and should not be assumed as such. – S3DEV Jun 27 '22 at 12:52
  • @S3DEV, np, won't do. But I was pretty close ^_^ – EvgenyKolyakov Jun 27 '22 at 12:56
  • Thank you for all the help! I appreciate the edits as well as the guidance! – RobC Jul 10 '22 at 20:33

0 Answers0