0

example:

matplotlib.pyplot.scatter(x, y, s=None, c=None, marker=None,
                          cmap=None, norm=None, vmin=None, vmax=None,
                          alpha=None, linewidths=None,
                          verts=<deprecated parameter>,
                          edgecolors=None,
                          \*, plotnonfinite=False, data=None, \*\*kwargs)

I know that * is used when you are passing a list, and ** is used for a dictionary. I don't get the use of \.

chepner
  • 497,756
  • 71
  • 530
  • 681
  • The backslashes look like someone tried to use this function call as part of some string where they had to escape the `*` character. Otherwise they don’t seem to make sense to me. But it’s hard to tell without more context. – mkrieger1 Jun 02 '20 at 15:15
  • That's a syntax error, whether its a function definition or function call. – chepner Jun 02 '20 at 15:16
  • The previous duplicate was not correct; this is not about positional-only or keyword-only arguments. – chepner Jun 02 '20 at 15:17
  • This looks like some sort of pseudo-code for documentation; no idea why the `*` are escaped. – chepner Jun 02 '20 at 15:19
  • Possibly the code is intended to be used in a Markdown document (where you'd have to escape the `*` characters to prevent them from being interpreted as italics or boldface). – kindall Jun 02 '20 at 15:21

0 Answers0