mirror of
https://github.com/github/codeql.git
synced 2025-12-25 05:06:34 +01:00
The Python 3 FAQ states that this is the right thing [0] It sadly doesn't align 100% with PEP8, which calls them for "arguments" [1], but after discussion with Taus, we decided to go with "parameter" everywhere to be consistent. [0] https://docs.python.org/3/faq/programming.html#faq-argument-vs-parameter [1] https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments
9 lines
247 B
Python
9 lines
247 B
Python
class Point:
|
|
def __init__(val, x, y): # first parameter is mis-named 'val'
|
|
val._x = x
|
|
val._y = y
|
|
|
|
class Point2:
|
|
def __init__(self, x, y): # first parameter is correctly named 'self'
|
|
self._x = x
|
|
self._y = y |