Can I use the word type
in my own code or is it reserved? My function header:
JavaScript
x
15
15
1
def get(
2
self,
3
region='Delhi',
4
city='Delhi',
5
category='Apartments',
6
type='For sale',
7
limit=60,
8
PAGESIZE=5,
9
year=2012,
10
month=1,
11
day=1,
12
next_page=None,
13
threetapspage=0,
14
):
15
Advertisement
Answer
Using type
as a keyword argument to a function will mask the built-in function “type” within the scope of the function. So while doing so does not raise a SyntaxError
, it is not considered good practice, and I would avoid doing so.